diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | Makefile.slim | 2 |
2 files changed, 11 insertions, 7 deletions
@@ -1,21 +1,23 @@ | |||
1 | LIBBU:=$(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) | 1 | LIBBU:=$(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) |
2 | SRC:=$(sort $(wildcard src/*.cpp) $(filter %.cpp,$(LIBBU))) | 2 | SRC:=$(sort $(wildcard src/*.cpp) $(patsubst src/%,src/bu/%,$(filter %.cpp,$(LIBBU)))) |
3 | OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) | 3 | OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) |
4 | REV:=$(shell svn info | grep "Revision" | cut -d\ -f2) | 4 | REV:=$(shell svn info | grep "Revision" | cut -d\ -f2) |
5 | VER:=r$(REV) | 5 | VER:=r$(REV) |
6 | PKG:=build-$(VER).tar.bz2 | 6 | PKG:=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 | ||
11 | all: extern build | 11 | all: extern build |
12 | 12 | ||
13 | package: clean depclean extern $(PKG) | 13 | package: 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): | |||
24 | clean: | 26 | clean: |
25 | -rm -Rf build $(OBJ) | 27 | -rm -Rf build $(OBJ) |
26 | 28 | ||
27 | depclean: | 29 | distclean: |
28 | -rm -Rf $(LIBBU) | 30 | -rm -Rf $(LIBBU) |
31 | -rm -Rf src/bu | ||
29 | 32 | ||
30 | extern: $(LIBBU) | 33 | extern: $(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 | ||
35 | build: src/build.yy.c src/build.tab.c $(OBJ) | 39 | build: src/build.yy.c src/build.tab.c $(OBJ) |
36 | g++ -ggdb -ldl -o build $(OBJ) | 40 | g++ -ggdb -ldl -o build $(OBJ) |
diff --git a/Makefile.slim b/Makefile.slim index c1da3e2..d12435f 100644 --- a/Makefile.slim +++ b/Makefile.slim | |||
@@ -1,4 +1,4 @@ | |||
1 | SRC:=$(sort $(wildcard src/*.cpp)) | 1 | SRC:=$(sort $(wildcard src/*.cpp) $(wildcard src/bu/*.cpp)) |
2 | OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) | 2 | OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) |
3 | 3 | ||
4 | .PHONY: all clean | 4 | .PHONY: all clean |