Mercurial > projects > orange
comparison Makefile @ 13:698b7c558bfb
Added makefile, thanks to jaysistar
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 30 Jul 2010 12:28:41 +0200 |
parents | |
children | 068e853b9c07 |
comparison
equal
deleted
inserted
replaced
12:02659867eac2 | 13:698b7c558bfb |
---|---|
1 LIBNAME = orange | |
2 SRC = \ | |
3 _.d \ | |
4 serialization/Events.d \ | |
5 serialization/RegisterWrapper.d \ | |
6 serialization/Serializable.d \ | |
7 serialization/SerializationException.d \ | |
8 serialization/Serializer.d \ | |
9 serialization/_.d \ | |
10 serialization/archives/Archive.d \ | |
11 serialization/archives/ArchiveException.d \ | |
12 serialization/archives/XMLArchive.d \ | |
13 serialization/archives/_.d \ | |
14 util/CTFE.d \ | |
15 util/Reflection.d \ | |
16 util/Traits.d \ | |
17 util/Use.d \ | |
18 util/_.d \ | |
19 util/io.d \ | |
20 util/string.d \ | |
21 util/collection/Array.d \ | |
22 xml/PhobosXML.d \ | |
23 xml/XMLDocument.d \ | |
24 _.d | |
25 | |
26 DC = dmd | |
27 DCFLAGS = -I/usr/include/d -I/usr/local/include/d | |
28 | |
29 | |
30 # Everything below this line should be fairly generic (with a few hard-coded things). | |
31 | |
32 OBJ = $(addsuffix .o,$(addprefix $(LIBNAME)/,$(basename $(SRC)))) | |
33 TARGET = lib/lib$(LIBNAME).a | |
34 | |
35 all : $(TARGET) | |
36 | |
37 install : $(TARGET) | |
38 @echo Installing $(LIBNAME) . . . | |
39 @cp $(TARGET) /usr/local/lib/lib$(LIBNAME).a | |
40 @echo Installing $(LIBNAME) import files . . . | |
41 @cp -r import/$(LIBNAME) /usr/local/include/d/$(LIBNAME) | |
42 @echo done. | |
43 | |
44 uninstall : | |
45 @echo Uninstalling $(LIBNAME) import files . . . | |
46 @rm -rf /usr/local/include/d/$(LIBNAME) | |
47 @echo Uninstalling $(LIBNAME) . . . | |
48 @rm -f /usr/local/lib/lib$(LIBNAME).a | |
49 @echo done. | |
50 | |
51 clean : | |
52 @echo Cleaning $(LIBNAME) . . . | |
53 @rm -rf import lib $(OBJ) | |
54 @echo done. | |
55 | |
56 $(TARGET) : $(OBJ) | |
57 @echo Linking $@ . . . | |
58 @$(DC) -lib $^ -of$@ | |
59 @echo done. | |
60 | |
61 %.o : %.d | |
62 @echo Compiling $< . . . | |
63 @$(DC) -c $(DCFLAGS) $< -of$@ -Hfimport/$(basename $@).di |