1 # Makefile to build the garbage collector D library for LDC
2 # Designed to work with GNU make
7 # Build the garbage collector library
9 # Generate documentation
11 # Delete unneeded files created by build process
13 LIB_TARGET_BC=libtango-gc-naive-bc.a
14 LIB_TARGET_NATIVE=libtango-gc-naive.a
15 LIB_TARGET_SHARED=libtango-gc-naive-shared.so
16 LIB_MASK=libtango-gc-naive*.*
25 #CFLAGS=-O3 $(ADD_CFLAGS)
28 #DFLAGS=-release -O3 -inline -w -nofloat $(ADD_DFLAGS)
29 DFLAGS=-w -disable-invariants $(ADD_DFLAGS)
31 #TFLAGS=-O3 -inline -w -nofloat $(ADD_DFLAGS)
32 TFLAGS=-w -disable-invariants $(ADD_DFLAGS)
34 DOCFLAGS=-version=DDoc
46 .SUFFIXES: .s .S .c .cpp .d .html .o .bc
49 $(CC) -c $(CFLAGS) $< -o$@
52 $(CC) -c $(CFLAGS) $< -o$@
55 $(CC) -c $(CFLAGS) $< -o$@
58 g++ -c $(CFLAGS) $< -o$@
61 $(DC) -c $(DFLAGS) $< -of$@ -output-bc
64 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
65 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
67 targets : lib sharedlib doc
68 all : lib sharedlib doc
69 lib : naive.lib naive.nlib
70 sharedlib : naive.sharedlib
73 ######################################################
91 ######################################################
95 ######################################################
97 naive.lib : $(LIB_TARGET_BC)
98 naive.nlib : $(LIB_TARGET_NATIVE)
99 naive.sharedlib : $(LIB_TARGET_SHARED)
101 $(LIB_TARGET_BC) : $(ALL_OBJS_O)
103 $(LC) $@ $(ALL_OBJS_BC)
106 $(LIB_TARGET_NATIVE) : $(ALL_OBJS_O)
108 $(CLC) $@ $(ALL_OBJS_O)
111 $(LIB_TARGET_SHARED) : $(ALL_OBJS_O)
113 $(CC) -shared -o $@ $(ALL_OBJS_O)
115 naive.doc : $(ALL_DOCS)
116 echo No documentation available.
118 ######################################################
121 find . -name "*.di" | xargs $(RM)
131 $(CP) $(LIB_MASK) $(LIB_DEST)/.