From a669219f71cabe41a5832bdda98c94e4ad63e529 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 18 Sep 2009 08:59:21 -0400 Subject: [PATCH] Permit both 32 and 64-bit builds Signed-off-by: Mathieu Desnoyers --- Makefile.inc | 8 ++++---- Makefile32 | 1 + Makefile64 | 1 + README | 2 ++ tests/Makefile32 | 1 + tests/Makefile64 | 1 + 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 18609e9..2eb0da8 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -35,13 +35,13 @@ urcu-qsbr.o: urcu-qsbr.c urcu-qsbr.h $(CC) -fPIC ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP) liburcu.so: urcu.o - $(CC) -fPIC -shared -o $@ $< + $(CC) ${LDFLAGS} -fPIC -shared -o $@ $< liburcu-qsbr.so: urcu-qsbr.o - $(CC) -fPIC -shared -o $@ $< + $(CC) ${LDFLAGS} -fPIC -shared -o $@ $< liburcu-mb.so: urcu-mb.o - $(CC) -fPIC -shared -o $@ $< + $(CC) ${LDFLAGS} -fPIC -shared -o $@ $< urcu-yield.o: urcu.c urcu.h $(CC) -DDEBUG_YIELD ${CFLAGS} $(LDFLAGS) -c -o $@ $(SRC_DEP) @@ -49,7 +49,7 @@ urcu-yield.o: urcu.c urcu.h .PHONY: clean install checkarch tests subdirs: - -for d in ${DIRS}; do cd $${d}; ${MAKE} ${MFLAGS}; done + -for d in ${DIRS}; do cd $${d}; ${MAKE} ${MFLAGS} ${EXTRAMFLAGS}; done install: liburcu.so cp -f liburcu.so liburcu-mb.so liburcu-qsbr.so /usr/lib/ diff --git a/Makefile32 b/Makefile32 index 7b30f9c..ab57691 100644 --- a/Makefile32 +++ b/Makefile32 @@ -1,4 +1,5 @@ include Makefile.inc +EXTRAMFLAGS=-f Makefile32 CFLAGS+=-m32 LDFLAGS+=-m32 diff --git a/Makefile64 b/Makefile64 index 6103d34..83ee8da 100644 --- a/Makefile64 +++ b/Makefile64 @@ -1,4 +1,5 @@ include Makefile.inc +EXTRAMFLAGS=-f Makefile64 CFLAGS+=-m64 LDFLAGS+=-m64 diff --git a/README b/README index 96389ad..b47fe48 100644 --- a/README +++ b/README @@ -5,6 +5,8 @@ BUILDING -------- make + #force 32-bit build with: make -f Makefile32 + #force 64-bit build with: make -f Makefile64 make install diff --git a/tests/Makefile32 b/tests/Makefile32 index 7b30f9c..ab57691 100644 --- a/tests/Makefile32 +++ b/tests/Makefile32 @@ -1,4 +1,5 @@ include Makefile.inc +EXTRAMFLAGS=-f Makefile32 CFLAGS+=-m32 LDFLAGS+=-m32 diff --git a/tests/Makefile64 b/tests/Makefile64 index 6103d34..83ee8da 100644 --- a/tests/Makefile64 +++ b/tests/Makefile64 @@ -1,4 +1,5 @@ include Makefile.inc +EXTRAMFLAGS=-f Makefile64 CFLAGS+=-m64 LDFLAGS+=-m64 -- 2.34.1