aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e2999e0..db9a17d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,23 @@
1LIBBU:=$(foreach f,paramproc.h paramproc.cpp staticstring.h staticstring.cpp exceptions.h exceptions.cpp serializable.h serializable.cpp exceptionbase.h exceptionbase.cpp plugger.h plugger.cpp singleton.h hashtable.cpp hashtable.h hashfunction.h hashfunction.cpp hashfunctionint.cpp hashfunctionint.h hashfunctionstring.cpp hashfunctionstring.h serializerbinary.cpp serializerbinary.h serializer.cpp serializer.h stringrep.h stringrep.cpp,src/$f) 1LIBBU:=$(foreach f,paramproc.h paramproc.cpp fstring.h fstring.cpp exceptions.h exceptions.cpp exceptionbase.cpp exceptionbase.h archive.cpp archive.h archival.cpp archival.h plugger.h plugger.cpp singleton.h hash.cpp hash.h file.h file.cpp stream.h stream.cpp list.h list.cpp,src/$f)
2SRC:=$(sort $(wildcard src/*.cpp) $(filter %.cpp,$(LIBBU))) 2SRC:=$(sort $(wildcard src/*.cpp) $(patsubst src/%,src/bu/%,$(filter %.cpp,$(LIBBU))))
3OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) 3OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC))
4REV:=$(shell svn info | grep "Revision" | cut -d\ -f2) 4REV:=$(shell svn info | grep "Revision" | cut -d\ -f2)
5VER:=r$(REV) 5VER:=r$(REV)
6PKG:=build-$(VER).tar.bz2 6PKG:=build-$(VER).tar.bz2
7 7
8.PHONY: all extern clean depclean package 8.PHONY: all extern clean distclean package
9# .SILENT: 9# .SILENT:
10 10
11all: extern build 11all: extern build
12 12
13package: clean depclean extern $(PKG) 13package: clean distclean extern $(PKG)
14 14
15$(PKG): 15$(PKG):
16 mkdir build-$(VER) 16 mkdir build-$(VER)
17 mkdir build-$(VER)/src 17 mkdir build-$(VER)/src
18 mkdir build-$(VER)/src/bu
18 cp -a src/*.{cpp,h,y,l} build-$(VER)/src 19 cp -a src/*.{cpp,h,y,l} build-$(VER)/src
20 cp -a src/bu/*.{cpp,h} build-$(VER)/src/bu
19 cp -a build.conf build-$(VER) 21 cp -a build.conf build-$(VER)
20 cp -a Makefile.slim build-$(VER)/Makefile 22 cp -a Makefile.slim build-$(VER)/Makefile
21 tar -c build-$(VER) | bzip2 -9 > $(PKG) 23 tar -c build-$(VER) | bzip2 -9 > $(PKG)
@@ -24,13 +26,15 @@ $(PKG):
24clean: 26clean:
25 -rm -Rf build $(OBJ) 27 -rm -Rf build $(OBJ)
26 28
27depclean: 29distclean:
28 -rm -Rf $(LIBBU) 30 -rm -Rf $(LIBBU)
31 -rm -Rf src/bu
29 32
30extern: $(LIBBU) 33extern: $(LIBBU)
31 34
32$(LIBBU): 35$(LIBBU):
33 wget -nv -Psrc/ http://svn.xagasoft.com/libbu++/trunk/$@ 36 mkdir -p src/bu
37 wget -nv -Psrc/bu http://svn.xagasoft.com/libbu++/trunk/$@
34 38
35build: src/build.yy.c src/build.tab.c $(OBJ) 39build: src/build.yy.c src/build.tab.c $(OBJ)
36 g++ -ggdb -ldl -o build $(OBJ) 40 g++ -ggdb -ldl -o build $(OBJ)