aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile51
-rw-r--r--Makefile.slim24
2 files changed, 0 insertions, 75 deletions
diff --git a/Makefile b/Makefile
deleted file mode 100644
index c1cf095..0000000
--- a/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
1LIBBU:=$(foreach f,paramproc.h paramproc.cpp fstring.h fstring.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 set.h set.cpp trace.h trace.cpp util.h fbasicstring.cpp fbasicstring.h sharedcore.cpp sharedcore.h archivebase.cpp archivebase.h util.h util.cpp,src/$f)
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))
4REV:=$(shell svn info | grep "Revision" | cut -d\ -f2)
5VER:=r$(REV)
6PKG:=build-$(VER).tar.bz2
7
8.PHONY: all extern clean distclean package
9# .SILENT:
10
11all: extern build
12
13package: clean distclean extern $(PKG)
14
15$(PKG):
16 mkdir build-$(VER)
17 mkdir build-$(VER)/src
18 mkdir build-$(VER)/src/bu
19 cp -a src/*.{cpp,h,y,l} build-$(VER)/src
20 cp -a src/bu/*.{cpp,h} build-$(VER)/src/bu
21 cp -a build.conf build-$(VER)
22 cp -a Makefile.slim build-$(VER)/Makefile
23 tar -c build-$(VER) | bzip2 -9 > $(PKG)
24 rm -Rf build-$(VER)
25
26clean:
27 -rm -Rf build $(OBJ)
28
29distclean:
30 -rm -Rf $(LIBBU)
31 -rm -Rf src/bu
32
33extern: $(LIBBU)
34
35$(LIBBU):
36 if [ ! -f src/bu/$@ ]; then mkdir -p src/bu; wget -nv -Psrc/bu http://svn.xagasoft.com/libbu++/trunk/$@; fi
37
38build: src/build.yy.c src/build.tab.c $(OBJ)
39 g++ -ggdb -ldl -o build $(OBJ)
40
41%.o: %.cpp
42 g++ -ggdb -Isrc -c -o $@ $<
43
44%.o: %.c
45 g++ -ggdb -Isrc -c -o $@ $<
46
47%.yy.c: %.l
48 flex --bison-bridge --bison-locations -o $@ $<
49
50%.tab.c: %.y
51 bison -v -b$(patsubst %.tab.c,%,$@) $<
diff --git a/Makefile.slim b/Makefile.slim
deleted file mode 100644
index d12435f..0000000
--- a/Makefile.slim
+++ /dev/null
@@ -1,24 +0,0 @@
1SRC:=$(sort $(wildcard src/*.cpp) $(wildcard src/bu/*.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,%,$@) $<