aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile21
-rw-r--r--Makefile.slim24
2 files changed, 43 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a2366be..e2999e0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,31 @@
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 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)
2SRC:=$(sort $(wildcard src/*.cpp) $(filter %.cpp,$(LIBBU))) 2SRC:=$(sort $(wildcard src/*.cpp) $(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)
5VER:=r$(REV)
6PKG:=build-$(VER).tar.bz2
4 7
5.PHONY: all extern clean 8.PHONY: all extern clean depclean package
6# .SILENT: 9# .SILENT:
7 10
8all: extern build 11all: extern build
9 12
13package: clean depclean extern $(PKG)
14
15$(PKG):
16 mkdir build-$(VER)
17 mkdir build-$(VER)/src
18 cp -a src/*.{cpp,h,y,l} build-$(VER)/src
19 cp -a build.conf build-$(VER)
20 cp -a Makefile.slim build-$(VER)/Makefile
21 tar -c build-$(VER) | bzip2 -9 > $(PKG)
22 rm -Rf build-$(VER)
23
10clean: 24clean:
11 -rm -Rf $(LIBBU) build $(OBJ) 25 -rm -Rf build $(OBJ)
26
27depclean:
28 -rm -Rf $(LIBBU)
12 29
13extern: $(LIBBU) 30extern: $(LIBBU)
14 31
diff --git a/Makefile.slim b/Makefile.slim
new file mode 100644
index 0000000..c1da3e2
--- /dev/null
+++ b/Makefile.slim
@@ -0,0 +1,24 @@
1SRC:=$(sort $(wildcard src/*.cpp))
2OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC))
3
4.PHONY: all clean
5
6all: build
7
8clean:
9 -rm -Rf build $(OBJ)
10
11build: src/build.yy.c src/build.tab.c $(OBJ)
12 g++ -ggdb -ldl -o build $(OBJ)
13
14%.o: %.cpp
15 g++ -ggdb -Isrc -c -o $@ $<
16
17%.o: %.c
18 g++ -ggdb -Isrc -c -o $@ $<
19
20%.yy.c: %.l
21 flex --bison-bridge --bison-locations -o $@ $<
22
23%.tab.c: %.y
24 bison -v -b$(patsubst %.tab.c,%,$@) $<