comparison tango/lib/common/tango/posix.mak @ 132:1700239cab2e trunk

[svn r136] MAJOR UNSTABLE UPDATE!!! Initial commit after moving to Tango instead of Phobos. Lots of bugfixes... This build is not suitable for most things.
author lindquist
date Fri, 11 Jan 2008 17:57:40 +0100
parents
children
comparison
equal deleted inserted replaced
131:5825d48b27d1 132:1700239cab2e
1 # Makefile to build the common D runtime library for Linux
2 # Designed to work with GNU make
3 # Targets:
4 # make
5 # Same as make all
6 # make lib
7 # Build the common library
8 # make doc
9 # Generate documentation
10 # make clean
11 # Delete unneeded files created by build process
12
13 LIB_TARGET=libtango-cc-tango.a
14 LIB_MASK=libtango-cc-tango*.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 DFLAGS=-release -O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
27 #DFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
28
29 TFLAGS=-O -inline -w -nofloat -version=Posix $(ADD_DFLAGS)
30 #TFLAGS=-g -w -nofloat -version=Posix $(ADD_DFLAGS)
31
32 DOCFLAGS=-version=DDoc -version=Posix
33
34 CC=gcc
35 LC=$(AR) -qsv
36 DC=dmd
37
38 INC_DEST=../../../tango
39 LIB_DEST=..
40 DOC_DEST=../../../doc/tango
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) -Hf$*.di $< -of$@
58 # $(DC) -c $(DFLAGS) $< -of$@
59
60 .d.html:
61 $(DC) -c -o- $(DOCFLAGS) -Df$*.html $<
62 # $(DC) -c -o- $(DOCFLAGS) -Df$*.html tango.ddoc $<
63
64 targets : lib doc
65 all : lib doc
66 tango : lib
67 lib : tango.lib
68 doc : tango.doc
69
70 ######################################################
71
72 OBJ_CORE= \
73 core/BitManip.o \
74 core/Exception.o \
75 core/Memory.o \
76 core/Runtime.o \
77 core/Thread.o \
78 core/ThreadASM.o
79
80 OBJ_STDC= \
81 stdc/wrap.o
82
83 OBJ_STDC_POSIX= \
84 stdc/posix/pthread_darwin.o
85
86 ALL_OBJS= \
87 $(OBJ_CORE) \
88 $(OBJ_STDC) \
89 $(OBJ_STDC_POSIX)
90
91 ######################################################
92
93 DOC_CORE= \
94 core/BitManip.html \
95 core/Exception.html \
96 core/Memory.html \
97 core/Runtime.html \
98 core/Thread.html
99
100
101 ALL_DOCS=
102
103 ######################################################
104
105 tango.lib : $(LIB_TARGET)
106
107 $(LIB_TARGET) : $(ALL_OBJS)
108 $(RM) $@
109 $(LC) $@ $(ALL_OBJS)
110
111 tango.doc : $(ALL_DOCS)
112 echo Documentation generated.
113
114 ######################################################
115
116 ### stdc/posix
117
118 stdc/posix/pthread_darwin.o : stdc/posix/pthread_darwin.d
119 $(DC) -c $(DFLAGS) stdc/posix/pthread_darwin.d -of$@
120
121 ######################################################
122
123 clean :
124 find . -name "*.di" | xargs $(RM)
125 $(RM) $(ALL_OBJS)
126 $(RM) $(ALL_DOCS)
127 find . -name "$(LIB_MASK)" | xargs $(RM)
128
129 install :
130 $(MD) $(INC_DEST)
131 find . -name "*.di" -exec cp -f {} $(INC_DEST)/{} \;
132 $(MD) $(DOC_DEST)
133 find . -name "*.html" -exec cp -f {} $(DOC_DEST)/{} \;
134 $(MD) $(LIB_DEST)
135 find . -name "$(LIB_MASK)" -exec cp -f {} $(LIB_DEST)/{} \;