comparison druntime/src/gc/stub/posix.mak @ 1458:e0b2d67cfe7c

Added druntime (this should be removed once it works).
author Robert Clipsham <robert@octarineparrot.com>
date Tue, 02 Jun 2009 17:43:06 +0100
parents
children
comparison
equal deleted inserted replaced
1456:7b218ec1044f 1458:e0b2d67cfe7c
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 debug
7 # Build the debug version of the library
8 # make release
9 # Build the release version of the library
10 # make doc
11 # Generate documentation
12 # make clean
13 # Delete all files created by build process
14
15 # Essentials
16
17 LIBDIR=../../../lib
18 DOCDIR=../../../doc
19 IMPDIR=../../../import
20 LIBBASENAME=libdruntime-gc-stub.a
21 MODULES=gc
22 BUILDS=debug release unittest
23
24 # Symbols
25
26 DMD=dmd
27 DOCFLAGS=-version=DDoc
28 DFLAGS_release=-d -release -O -inline -w -nofloat
29 DFLAGS_debug=-d -g -w -nofloat
30 DFLAGS_unittest=$(DFLAGS_release) -unittest
31 CFLAGS_release=-m32 -O
32 CFLAGS_debug=-m32 -g
33 CFLAGS_unittest=$(CFLAGS_release)
34
35 # Derived symbols
36
37 SRCS=$(addsuffix .d,$(MODULES))
38 DOCS=
39 IMPORTS=
40 ALLLIBS=$(addsuffix /$(LIBBASENAME),$(addprefix $(LIBDIR)/,$(BUILDS)))
41
42 # Patterns
43
44 $(LIBDIR)/%/$(LIBBASENAME) : $(SRCS)
45 $(DMD) $(DFLAGS_$*) -lib -of$@ $^
46
47 $(DOCDIR)/%.html : %.d
48 $(DMD) -c -d -o- -Df$@ $<
49
50 $(IMPDIR)/%.di : %.d
51 $(DMD) -c -d -o- -Hf$@ $<
52
53 # Rulez
54
55 all : $(BUILDS) doc
56
57 debug : $(LIBDIR)/debug/$(LIBBASENAME) $(IMPORTS)
58 release : $(LIBDIR)/release/$(LIBBASENAME) $(IMPORTS)
59 unittest : $(LIBDIR)/unittest/$(LIBBASENAME) $(IMPORTS)
60 #doc : $(DOCS)
61
62 clean :
63 rm -f $(IMPORTS) $(DOCS) $(ALLLIBS)