summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile80
-rw-r--r--Makefile.legacy78
-rw-r--r--pymake.conf44
-rw-r--r--src/test/hashtest/hashtest.cpp (renamed from src/test/hashtest.cpp)0
-rw-r--r--src/test/log/log.cpp (renamed from src/test/log.cpp)0
-rw-r--r--src/test/md5test/md5test.cpp (renamed from src/test/md5test.cpp)0
-rw-r--r--src/test/param/param.cpp (renamed from src/test/param.cpp)0
-rw-r--r--src/test/param/param.h (renamed from src/test/param.h)0
-rw-r--r--src/test/serialize/serialize.cpp (renamed from src/test/serialize.cpp)0
-rw-r--r--src/test/serializetext/serializetext.cpp (renamed from src/test/serializetext.cpp)0
-rw-r--r--src/test/xmlreadtest/xmlreadtest.cpp (renamed from src/test/xmlreadtest.cpp)0
-rw-r--r--src/test/xmlrepltest/xmlrepltest.cpp (renamed from src/test/xmlrepltest.cpp)0
-rw-r--r--src/test/xmlwritetest/xmlwritetest.cpp (renamed from src/test/xmlwritetest.cpp)0
-rw-r--r--src/unit/hashtable/hashtable.cpp (renamed from src/unit/hashtable.cpp)0
-rw-r--r--src/unit/xml/xml.cpp (renamed from src/unit/xml.cpp)0
15 files changed, 125 insertions, 77 deletions
diff --git a/Makefile b/Makefile
index 0afb4a0..2257ecc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,78 +1,4 @@
1OBJS:=$(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) 1.PHONY: pymake
2USRCS:=$(wildcard src/unit/*.cpp)
3UOBJS:=$(patsubst %.cpp,%.o,$(USRCS))
4UNIT:=$(foreach ut,$(patsubst %.cpp,%,$(wildcard src/unit/*.cpp)),unit/$(notdir $(ut)))
5TOBJS:=$(patsubst %.cpp,%.o,$(wildcard src/test/*.cpp))
6TDIRS:=$(filter-out %.o %.cpp %.h %.d,$(wildcard src/test/*))
7TESTS:=$(patsubst src/test/%.o,tests/%,$(TOBJS)) $(patsubst src/test/%,tests/%,$(TDIRS))
8ATOBJS:=$(TOBJS) $(patsubst %.cpp,%.o,$(foreach dr,$(TDIRS),$(wildcard $(dr)/*.cpp)))
9LIB:=libbu++.a
10DATE:=$(shell date +%F)
11
12TXTCPP:="\ g++:\ \ \ "
13TXTLNK:="\ \ ld:\ \ \ "
14TXTDEP:="\ dep:\ \ \ "
15TXTARC:="\ \ ar:\ \ \ "
16
17.PHONY: all clean dist tests depclean cleanapi
18.SILENT: clean $(OBJS) $(TOBJS) $(ATOBJS) $(UNIT) $(UOBJS) $(TESTS) $(patsubst %.o,%.d,$(OBJS) $(TOBJS) $(ATOBJS) $(UOBJS) $(TESTS)) $(LIB)
19
20all: libbu++.a
21
22depclean:
23 -rm $(patsubst %.o,%.d,$(OBJS) $(ATOBJS) $(UOBJS))
24
25-include $(patsubst %.o,%.d,$(OBJS) $(ATOBJS) $(UOBJS))
26
27clean:
28 -rm $(OBJS) $(ATOBJS) $(UOBJS) $(TESTS) $(LIB)
29
30# This bit I cribbed from the docs, seems to work great though!
31%.d: %.cpp
32 echo "$(TXTDEP)$@"
33 g++ $(CXXFLAGS) -Isrc -M $(CPPFLAGS) $< | sed 's,\($(notdir $*)\)\.o[: ]*,$(dir $*)\1.o $@: ,g' > $@
34
35%.o: %.cpp
36 echo "$(TXTCPP)$@"
37 g++ -fPIC $(CXXFLAGS) -Isrc $(foreach dr,$(filter $(dir $@),$(foreach ddr,$(TDIRS),$(ddr)/)),-I$(dr)) -ggdb -c -o $@ $<
38
39$(LIB): $(OBJS)
40 echo "$(TXTARC)$@"
41 ar cr $(LIB) $(OBJS)
42
43$(TESTS): $(ATOBJS) $(LIB)
44 echo "$(TXTLNK)$@"
45 g++ $(LDFLAGS) -ggdb $(filter %$(patsubst tests/%,%,$@).o, $(TOBJS) ) $(patsubst %.cpp,%.o,$(wildcard $(filter %$(patsubst tests/%,%,$@), $(TDIRS))/*.cpp)) -L. -lbu++ -ldl -o $@
46
47$(UNIT): $(USRCS) $(LIB)
48 echo "$(TXTLNK)$@"
49 g++ $(LDFLAGS) -ggdb -Isrc -Isrc/unit src/$@.cpp -L. -lbu++ -lcpptest -o $@
50
51tests: $(TESTS)
52
53unit: $(UNIT)
54
55dist: clean depclean
56 mkdir libbu++-$(DATE)
57 cp -a --target-directory=libbu++-$(DATE) Makefile src
58 tar --exclude=\.svn -c libbu++-$(DATE) | bzip2 -9 > libbu++-$(DATE).tar.bz2
59 rm -Rf libbu++-$(DATE)
60
61install: libbu++.a
62 cat src/*.h | grep -v "#include \"" - > libbu++.h
63 cp -a libbu++.a $(PREFIX)/lib
64 cp -a libbu++.h $(PREFIX)/include
65
66cleanapi:
67 -rm -Rf api
68
69api: $(SRC)
70 -rm -Rf api
71 doxygen
72 make -C api/latex
73
74#tests: $(TOBJS) $(LIB)
75# for file in $(patsubst src/test/%.o,%,$(TOBJS)); \
76# do g++ -o $$file src/test/$$file.o -L. -lbu++; \
77# done
78 2
3pymake:
4 pymake
diff --git a/Makefile.legacy b/Makefile.legacy
new file mode 100644
index 0000000..0afb4a0
--- /dev/null
+++ b/Makefile.legacy
@@ -0,0 +1,78 @@
1OBJS:=$(patsubst %.cpp,%.o,$(wildcard src/*.cpp))
2USRCS:=$(wildcard src/unit/*.cpp)
3UOBJS:=$(patsubst %.cpp,%.o,$(USRCS))
4UNIT:=$(foreach ut,$(patsubst %.cpp,%,$(wildcard src/unit/*.cpp)),unit/$(notdir $(ut)))
5TOBJS:=$(patsubst %.cpp,%.o,$(wildcard src/test/*.cpp))
6TDIRS:=$(filter-out %.o %.cpp %.h %.d,$(wildcard src/test/*))
7TESTS:=$(patsubst src/test/%.o,tests/%,$(TOBJS)) $(patsubst src/test/%,tests/%,$(TDIRS))
8ATOBJS:=$(TOBJS) $(patsubst %.cpp,%.o,$(foreach dr,$(TDIRS),$(wildcard $(dr)/*.cpp)))
9LIB:=libbu++.a
10DATE:=$(shell date +%F)
11
12TXTCPP:="\ g++:\ \ \ "
13TXTLNK:="\ \ ld:\ \ \ "
14TXTDEP:="\ dep:\ \ \ "
15TXTARC:="\ \ ar:\ \ \ "
16
17.PHONY: all clean dist tests depclean cleanapi
18.SILENT: clean $(OBJS) $(TOBJS) $(ATOBJS) $(UNIT) $(UOBJS) $(TESTS) $(patsubst %.o,%.d,$(OBJS) $(TOBJS) $(ATOBJS) $(UOBJS) $(TESTS)) $(LIB)
19
20all: libbu++.a
21
22depclean:
23 -rm $(patsubst %.o,%.d,$(OBJS) $(ATOBJS) $(UOBJS))
24
25-include $(patsubst %.o,%.d,$(OBJS) $(ATOBJS) $(UOBJS))
26
27clean:
28 -rm $(OBJS) $(ATOBJS) $(UOBJS) $(TESTS) $(LIB)
29
30# This bit I cribbed from the docs, seems to work great though!
31%.d: %.cpp
32 echo "$(TXTDEP)$@"
33 g++ $(CXXFLAGS) -Isrc -M $(CPPFLAGS) $< | sed 's,\($(notdir $*)\)\.o[: ]*,$(dir $*)\1.o $@: ,g' > $@
34
35%.o: %.cpp
36 echo "$(TXTCPP)$@"
37 g++ -fPIC $(CXXFLAGS) -Isrc $(foreach dr,$(filter $(dir $@),$(foreach ddr,$(TDIRS),$(ddr)/)),-I$(dr)) -ggdb -c -o $@ $<
38
39$(LIB): $(OBJS)
40 echo "$(TXTARC)$@"
41 ar cr $(LIB) $(OBJS)
42
43$(TESTS): $(ATOBJS) $(LIB)
44 echo "$(TXTLNK)$@"
45 g++ $(LDFLAGS) -ggdb $(filter %$(patsubst tests/%,%,$@).o, $(TOBJS) ) $(patsubst %.cpp,%.o,$(wildcard $(filter %$(patsubst tests/%,%,$@), $(TDIRS))/*.cpp)) -L. -lbu++ -ldl -o $@
46
47$(UNIT): $(USRCS) $(LIB)
48 echo "$(TXTLNK)$@"
49 g++ $(LDFLAGS) -ggdb -Isrc -Isrc/unit src/$@.cpp -L. -lbu++ -lcpptest -o $@
50
51tests: $(TESTS)
52
53unit: $(UNIT)
54
55dist: clean depclean
56 mkdir libbu++-$(DATE)
57 cp -a --target-directory=libbu++-$(DATE) Makefile src
58 tar --exclude=\.svn -c libbu++-$(DATE) | bzip2 -9 > libbu++-$(DATE).tar.bz2
59 rm -Rf libbu++-$(DATE)
60
61install: libbu++.a
62 cat src/*.h | grep -v "#include \"" - > libbu++.h
63 cp -a libbu++.a $(PREFIX)/lib
64 cp -a libbu++.h $(PREFIX)/include
65
66cleanapi:
67 -rm -Rf api
68
69api: $(SRC)
70 -rm -Rf api
71 doxygen
72 make -C api/latex
73
74#tests: $(TOBJS) $(LIB)
75# for file in $(patsubst src/test/%.o,%,$(TOBJS)); \
76# do g++ -o $$file src/test/$$file.o -L. -lbu++; \
77# done
78
diff --git a/pymake.conf b/pymake.conf
new file mode 100644
index 0000000..810e3c6
--- /dev/null
+++ b/pymake.conf
@@ -0,0 +1,44 @@
1### pymake by ~3o~ph()g (neonphog.com) ###
2## This skeleton file was generated by pymake... please edit for your project.
3
4[BUILD]
5DIR: src
6COMMAND: lib
7OUTPUT: libbu++.a
8
9[DIRBUILD]
10COMMAND: exe
11OUTPUT: tests/{NAME}
12ROOT: src/test
13LDFLAGS: -L. -lbu++
14CXXFLAGS: -Isrc -Isrc/test
15
16[OVERRIDE]
17FILE: tests/plugin
18LDFLAGS: -ldl
19
20[DIRBUILD]
21COMMAND: exe
22OUTPUT: unit/{NAME}
23ROOT: src/unit
24LDFLAGS: -L. -lbu++ -lcpptest
25CXXFLAGS: -Isrc
26
27[TRIGGER]
28INPUT: .cpp #take input of *.cpp files
29OUTPUT: .o #output .o files
30COMMAND: g++ -c {INPUT} {CXXFLAGS} -I{DIR} -o {OUTPUT}
31CHECK: g++ -M {INPUT} {CXXFLAGS} -I{DIR}
32
33### Executable command ###
34## Use this command if you want a simple executable
35[COMMAND]
36NAME: exe
37COMMAND: g++ {INPUT} {LDFLAGS} -o {OUTPUT}
38
39### Library command ###
40## Use this command if you wish to create a library
41[COMMAND]
42NAME: lib
43COMMAND: ar cr{ARFLAGS} {OUTPUT} {INPUT}
44
diff --git a/src/test/hashtest.cpp b/src/test/hashtest/hashtest.cpp
index f31a3f8..f31a3f8 100644
--- a/src/test/hashtest.cpp
+++ b/src/test/hashtest/hashtest.cpp
diff --git a/src/test/log.cpp b/src/test/log/log.cpp
index d7cfa0b..d7cfa0b 100644
--- a/src/test/log.cpp
+++ b/src/test/log/log.cpp
diff --git a/src/test/md5test.cpp b/src/test/md5test/md5test.cpp
index 6f832df..6f832df 100644
--- a/src/test/md5test.cpp
+++ b/src/test/md5test/md5test.cpp
diff --git a/src/test/param.cpp b/src/test/param/param.cpp
index a4d2824..a4d2824 100644
--- a/src/test/param.cpp
+++ b/src/test/param/param.cpp
diff --git a/src/test/param.h b/src/test/param/param.h
index 2756b69..2756b69 100644
--- a/src/test/param.h
+++ b/src/test/param/param.h
diff --git a/src/test/serialize.cpp b/src/test/serialize/serialize.cpp
index e233704..e233704 100644
--- a/src/test/serialize.cpp
+++ b/src/test/serialize/serialize.cpp
diff --git a/src/test/serializetext.cpp b/src/test/serializetext/serializetext.cpp
index f6be7d3..f6be7d3 100644
--- a/src/test/serializetext.cpp
+++ b/src/test/serializetext/serializetext.cpp
diff --git a/src/test/xmlreadtest.cpp b/src/test/xmlreadtest/xmlreadtest.cpp
index e2d2a0a..e2d2a0a 100644
--- a/src/test/xmlreadtest.cpp
+++ b/src/test/xmlreadtest/xmlreadtest.cpp
diff --git a/src/test/xmlrepltest.cpp b/src/test/xmlrepltest/xmlrepltest.cpp
index 1fe9ec2..1fe9ec2 100644
--- a/src/test/xmlrepltest.cpp
+++ b/src/test/xmlrepltest/xmlrepltest.cpp
diff --git a/src/test/xmlwritetest.cpp b/src/test/xmlwritetest/xmlwritetest.cpp
index 2986c35..2986c35 100644
--- a/src/test/xmlwritetest.cpp
+++ b/src/test/xmlwritetest/xmlwritetest.cpp
diff --git a/src/unit/hashtable.cpp b/src/unit/hashtable/hashtable.cpp
index b2e1cf5..b2e1cf5 100644
--- a/src/unit/hashtable.cpp
+++ b/src/unit/hashtable/hashtable.cpp
diff --git a/src/unit/xml.cpp b/src/unit/xml/xml.cpp
index e4d779c..e4d779c 100644
--- a/src/unit/xml.cpp
+++ b/src/unit/xml/xml.cpp