aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-05-03 06:30:36 +0000
committerMike Buland <eichlan@xagasoft.com>2012-05-03 06:30:36 +0000
commitdf6a899ad6c9a1c792582ef1a3b838c7eb6d330c (patch)
treeff9e17d0fd00585bc1e329a63c20f90d155b4ea8 /Makefile
parent343bffafecd4329ce5ae6625fc6b2c1ea9759f36 (diff)
downloadlibbu++-df6a899ad6c9a1c792582ef1a3b838c7eb6d330c.tar.gz
libbu++-df6a899ad6c9a1c792582ef1a3b838c7eb6d330c.tar.bz2
libbu++-df6a899ad6c9a1c792582ef1a3b838c7eb6d330c.tar.xz
libbu++-df6a899ad6c9a1c792582ef1a3b838c7eb6d330c.zip
Rearranging some stuff.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ea8b1db..60a31b8 100644
--- a/Makefile
+++ b/Makefile
@@ -5,18 +5,26 @@
5# terms of the license contained in the file LICENSE. 5# terms of the license contained in the file LICENSE.
6# 6#
7 7
8PREFIX := /home/eichlan/testroot
8OBJECTS := $(patsubst %.cpp,%.o,$(wildcard src/stable/*.cpp src/unstable/*.cpp src/experimental/*.cpp)) 9OBJECTS := $(patsubst %.cpp,%.o,$(wildcard src/stable/*.cpp src/unstable/*.cpp src/experimental/*.cpp))
9HEADERS := bu bu/signals.h bu/autoconfig.h bu/version.h bu/config.h $(foreach fn,$(wildcard src/stable/*.h src/unstable/*.h src/experimental/*.h),bu/$(notdir ${fn})) $(patsubst src/%,bu/%,$(wildcard src/compat/*.h)) 10HEADERS := bu/signals.h bu/autoconfig.h bu/version.h bu/config.h $(foreach fn,$(wildcard src/stable/*.h src/unstable/*.h src/experimental/*.h),bu/$(notdir ${fn})) $(patsubst src/%,bu/%,$(wildcard src/compat/*.h))
10TOOLS := $(patsubst src/tools/%.cpp,%,$(wildcard src/tools/*.cpp)) 11TOOLS := $(patsubst src/tools/%.cpp,%,$(wildcard src/tools/*.cpp))
11UNITS := $(patsubst src/unit/%.unit,unit/%,$(wildcard src/unit/*.unit)) 12UNITS := $(patsubst src/unit/%.unit,unit/%,$(wildcard src/unit/*.unit))
12TESTS := $(patsubst src/tests/%.cpp,tests/%,$(wildcard src/tests/*.cpp)) 13TESTS := $(patsubst src/tests/%.cpp,tests/%,$(wildcard src/tests/*.cpp))
13 14
14.PHONY: default all headers clean tests 15.PHONY: default all headers clean tests install
15 16
16default: libbu++.a tools 17default: libbu++.a tools
17 18
18all: default tests 19all: default tests
19 20
21install: libbu++.a tools
22 install -d ${PREFIX}/{include/bu/compat,lib,bin}
23 install -m u=rw,go=r $(filter-out bu/compat/%,${HEADERS}) ${PREFIX}/include/bu
24 install -m u=rw,go=r $(filter bu/compat/%,${HEADERS}) ${PREFIX}/include/bu/compat
25 install -m u=rw,go=r libbu++.a ${PREFIX}/lib
26 install ${TOOLS} ${PREFIX}/bin
27
20tests: ${UNITS} ${TESTS} 28tests: ${UNITS} ${TESTS}
21 29
22clean: 30clean:
@@ -49,7 +57,7 @@ src/autoconfig.h src/version.h: autoconfig
49src/signals.h: pregen/signals.h 57src/signals.h: pregen/signals.h
50 cp $< $@ 58 cp $< $@
51 59
52headers: ${HEADERS} 60headers: bu ${HEADERS}
53 61
54tools: ${TOOLS} 62tools: ${TOOLS}
55 63
@@ -93,6 +101,6 @@ tests/lzma:
93tests/threadid: 101tests/threadid:
94 g++ -ggdb -W -Wall -I. -L. $< -o $@ -lbu++ -lpthread 102 g++ -ggdb -W -Wall -I. -L. $< -o $@ -lbu++ -lpthread
95 103
96libbu++.a: ${HEADERS} ${OBJECTS} 104libbu++.a: bu ${HEADERS} ${OBJECTS}
97 ar -r libbu++.a ${OBJECTS} 105 ar -r libbu++.a ${OBJECTS}
98 106