diff options
author | Tobias Rapp <tobias.rapp@student.kit.edu> | 2013-08-22 10:32:08 +0200 |
---|---|---|
committer | Tobias Rapp <tobias.rapp@student.kit.edu> | 2013-08-22 10:32:08 +0200 |
commit | 8f1a861dc9a6593d845fcdbd07b717b657cd7e55 (patch) | |
tree | 9cdeab836402812f61582142c9ac661a1cc4731c | |
parent | 691630c2d9584ff19343cfd066455583770d5c76 (diff) |
Makefiles now move the library to a build directory
-rw-r--r-- | Makefile.direct | 13 | ||||
-rw-r--r-- | Makefile.octopos | 38 |
2 files changed, 32 insertions, 19 deletions
diff --git a/Makefile.direct b/Makefile.direct index b5c1a64..14f7fc9 100644 --- a/Makefile.direct +++ b/Makefile.direct @@ -20,6 +20,9 @@ AS_ABI_FLAG=$(ABI_FLAG) # ABI flag for assembler. On HP/UX this is +A64 for 64 bit # executables. +# Release/build directory +RELEASE_DIR=build/i686-linux + CC=cc $(ABI_FLAG) CXX=g++ $(ABI_FLAG) AS=as $(AS_ABI_FLAG) @@ -169,7 +172,7 @@ SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include # not time-critical anyway. # Set SPECIALCFLAGS to -q nodirect_code on Encore. -all: gc.a gctest +all: gc.a # if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to # the default location, and we need to build @@ -229,7 +232,7 @@ tests/test.o: tests $(srcdir)/tests/test.c tests: mkdir tests -base_lib gc.a: $(OBJS) dyn_load.o $(UTILS) +base_lib gc.a: $(RELEASE_DIR) $(OBJS) dyn_load.o $(UTILS) echo > base_lib rm -f dont_ar_1 cp $(AO_INSTALL_DIR)/lib/libatomic_ops.a gc.a @@ -240,6 +243,10 @@ base_lib gc.a: $(OBJS) dyn_load.o $(UTILS) ./if_not_there dont_ar_1 $(AR) ru gc.a $(OBJS) dyn_load.o ./if_not_there dont_ar_1 $(RANLIB) gc.a || cat /dev/null # ignore ranlib failure; that usually means it doesn't exist, and isn't needed + mv gc.a $(RELEASE_DIR) + +$(RELEASE_DIR): + mkdir $(RELEASE_DIR) cords: $(CORD_OBJS) cord/cordtest $(UTILS) rm -f dont_ar_3 @@ -391,7 +398,7 @@ clean: base_lib c++ threadlibs $(CORD_OBJS) cord/cordtest cord/de -rm -f *~ -gctest: tests/test.o gc.a $(UTILS) +gctest: tests/test.o $(RELEASE_DIR)/gc.a $(UTILS) rm -f gctest ./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o gctest tests/test.o gc.a -lucb ./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o gctest tests/test.o gc.a -ldld `./threadlibs` diff --git a/Makefile.octopos b/Makefile.octopos index 8d7c324..0887e81 100644 --- a/Makefile.octopos +++ b/Makefile.octopos @@ -2,12 +2,12 @@ # to build the collector. # # Primary targets: -# libgc.a - builds basic library +# gc.a - builds basic library # c++ - adds C++ interface to library # cords - adds cords (heavyweight strings) to library -# test - prints porting information, then builds basic version of libgc.a, +# test - prints porting information, then builds basic version of gc.a, # and runs some tests of collector and cords. Does not add cords or -# c++ interface to libgc.a +# c++ interface to gc.a # cord/de - builds dumb editor based on cords. ABI_FLAG= @@ -31,12 +31,14 @@ AS=as $(AS_ABI_FLAG) srcdir= . VPATH= $(srcdir) +# Release/Build directory +RELEASE_DIR=build/i686-invasic-octopos + # Atomic_ops installation directory. If this doesn't exist, we create # it from the included libatomic_ops distribution. AO_SRC_DIR=$(srcdir)/libatomic_ops AO_INSTALL_DIR=$(srcdir)/libatomic_ops-install - OCTOPOS_RELEASE = current OCTOPOS_ARCH = x86guest OCTOPOS_VARIANT = multitile @@ -47,7 +49,7 @@ CC_HEADER = $(shell $(CC) -m32 --print-file-name=include) OCTOPOS_CFLAGS = -Wno-trigraphs -fno-stack-protector -mfpmath=sse -msse2 -m32 -nostdinc -undef \ -I$(OCTOPOS_HEADER_DIR) -D__OCTOPOS__ -isystem $(CC_HEADER) -CFLAGS= -O $(OCTOPOS_CFLAGS) -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS -g +CFLAGS= -O $(OCTOPOS_CFLAGS) -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS -DPARALLEL_MARK -g # To build the parallel collector on Linux, add to the above: # -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC @@ -181,7 +183,7 @@ SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include # not time-critical anyway. # Set SPECIALCFLAGS to -q nodirect_code on Encore. -all: libgc.a +all: gc.a # if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to # the default location, and we need to build @@ -190,19 +192,19 @@ $(AO_INSTALL_DIR): LEAKFLAGS=$(CFLAGS) -DFIND_LEAK -BSD-pkg-all: bsd-libgc.a bsd-libleak.a +BSD-pkg-all: bsd-gc.a bsd-libleak.a -bsd-libgc.a: +bsd-gc.a: $(MAKE) CFLAGS="$(CFLAGS)" clean c++-t - mv libgc.a bsd-libgc.a + mv gc.a bsd-gc.a bsd-libleak.a: $(MAKE) -f Makefile.direct CFLAGS="$(LEAKFLAGS)" clean c++-nt - mv libgc.a bsd-libleak.a + mv gc.a bsd-libleak.a BSD-pkg-install: BSD-pkg-all - ${CP} bsd-libgc.a libgc.a - ${INSTALL_DATA} libgc.a ${PREFIX}/lib + ${CP} bsd-gc.a gc.a + ${INSTALL_DATA} gc.a ${PREFIX}/lib ${INSTALL_DATA} gc.h gc_cpp.h ${PREFIX}/include ${INSTALL_MAN} doc/gc.man ${PREFIX}/man/man3/gc.3 @@ -241,11 +243,15 @@ tests/test.o: tests $(srcdir)/tests/test.c tests: mkdir tests -base_lib libgc.a: $(OBJS) +base_lib gc.a: $(RELEASE_DIR) $(OBJS) echo > base_lib - cp $(AO_INSTALL_DIR)/lib/libatomic_ops.a libgc.a - $(AR) ru libgc.a $(OBJS) - $(RANLIB) libgc.a || cat /dev/null + cp $(AO_INSTALL_DIR)/lib/libatomic_ops.a gc.a + $(AR) ru gc.a $(OBJS) + $(RANLIB) gc.a || cat /dev/null + mv gc.a $(RELEASE_DIR) + +$(RELEASE_DIR): + mkdir $(RELEASE_DIR) cords: $(CORD_OBJS) cord/cordtest $(UTILS) rm -f dont_ar_3 |