comparison druntime/src/gc/stub/ldc.mak @ 759:d3eb054172f9

Added copy of druntime from DMD 2.020 modified for LDC.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 11 Nov 2008 01:52:37 +0100
parents
children
comparison
equal deleted inserted replaced
758:f04dde6e882c 759:d3eb054172f9
1 # Makefile to build the garbage collector D library for Posix
2 # Designed to work with GNU make
3 # Targets:
4 # make
5 # Same as make all
6 # make lib
7 # Build the garbage collector library
8 # make doc
9 # Generate documentation
10 # make clean
11 # Delete unneeded files created by build process
12
13 LIB_TARGET=druntime-gc-stub.a
14 LIB_MASK=druntime-gc-stub*.a
15
16 CP=cp -f
17 RM=rm -f
18 MD=mkdir -p
19
20 ADD_CFLAGS=
21 ADD_DFLAGS=
22
23 CFLAGS=-O -m32 $(ADD_CFLAGS)
24 #CFLAGS=-g -m32 $(ADD_CFLAGS)
25
26 ### warnings disabled because gcx has issues ###
27
28 DFLAGS=-release -O -inline $(ADD_DFLAGS)
29 #DFLAGS=-g $(ADD_DFLAGS)
30
31 TFLAGS=-O -inline $(ADD_DFLAGS)
32 #TFLAGS=-g $(ADD_DFLAGS)
33
34 DOCFLAGS=-version=DDoc
35
36 CC=gcc
37 LC=$(AR) -qsv
38 DC=ldc2
39
40 LIB_DEST=..
41
42 .SUFFIXES: .s .S .c .cpp .d .html .o
43
44 .s.o:
45 $(CC) -c $(CFLAGS) $< -o$@
46
47 .S.o:
48 $(CC) -c $(CFLAGS) $< -o$@
49
50 .c.o:
51 $(CC) -c $(CFLAGS) $< -o$@
52
53 .cpp.o:
54 g++ -c $(CFLAGS) $< -o$@
55
56 .d.o:
57 $(DC) -c $(DFLAGS) $< -of$@
58
59 .d.html:
60 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
61 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html dmd.ddoc $<
62
63 targets : lib doc
64 all : lib doc
65 lib : stub.lib
66 doc : stub.doc
67
68 ######################################################
69
70 ALL_OBJS= \
71 gc.o
72
73 ######################################################
74
75 ALL_DOCS=
76
77 ######################################################
78
79 stub.lib : $(LIB_TARGET)
80
81 $(LIB_TARGET) : $(ALL_OBJS)
82 $(RM) $@
83 $(LC) $@ $(ALL_OBJS)
84
85 stub.doc : $(ALL_DOCS)
86 echo No documentation available.
87
88 ######################################################
89
90 clean :
91 find . -name "*.di" | xargs $(RM)
92 $(RM) $(ALL_OBJS)
93 $(RM) $(ALL_DOCS)
94 $(RM) $(LIB_MASK)
95
96 install :
97 $(MD) $(LIB_DEST)
98 $(CP) $(LIB_MASK) $(LIB_DEST)/.