1 # Makefile to build the composite D runtime library for Linux
2 # Designed to work with GNU make
7 # Build the runtime library
9 # Generate documentation
11 # Delete unneeded files created by build process
13 LIB_BASE=libdruntime-dmd
15 LIB_TARGET=$(LIB_BASE)$(LIB_BUILD).a
16 LIB_MASK=$(LIB_BASE)*.a
17 DUP_TARGET=libdruntime$(LIB_BUILD).a
18 DUP_MASK=libdruntime*.a
41 ######################################################
45 ######################################################
49 ######################################################
52 make -fdmd-posix.mak lib MAKE_LIB="unittest"
53 dmd -unittest unittest ../import/core/stdc/stdarg -defaultlib="$(DUP_TARGET)" -debuglib="$(DUP_TARGET)"
58 make -fdmd-posix.mak lib MAKE_LIB="release"
61 make -fdmd-posix.mak lib MAKE_LIB="debug" LIB_BUILD="-d"
63 ######################################################
66 make -C $(DIR_CC) -fposix.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
67 make -C $(DIR_RT) -fposix.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
68 make -C $(DIR_GC) -fposix.mak $(MAKE_LIB) DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
70 $(LC) $(LIB_TARGET) `find $(DIR_CC) -name "*.o" | xargs echo`
71 $(LC) $(LIB_TARGET) `find $(DIR_RT) -name "*.o" | xargs echo`
72 $(LC) $(LIB_TARGET) `find $(DIR_GC) -name "*.o" | xargs echo`
74 $(CP) $(LIB_TARGET) $(DUP_TARGET)
77 make -C $(DIR_CC) -fposix.mak doc DC=$(DC)
78 make -C $(DIR_RT) -fposix.mak doc DC=$(DC)
79 make -C $(DIR_GC) -fposix.mak doc DC=$(DC)
81 ######################################################
84 find . -name "*.di" | xargs $(RM)
87 make -C $(DIR_CC) -fposix.mak clean
88 make -C $(DIR_RT) -fposix.mak clean
89 make -C $(DIR_GC) -fposix.mak clean
92 $(RM) unittest unittest.o
95 make -C $(DIR_CC) -fposix.mak install
96 make -C $(DIR_RT) -fposix.mak install
97 make -C $(DIR_GC) -fposix.mak install
98 $(CP) $(LIB_MASK) $(LIB_DEST)/.
99 $(CP) $(DUP_MASK) $(LIB_DEST)/.