diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-05-03 06:30:36 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-05-03 06:30:36 +0000 |
commit | df6a899ad6c9a1c792582ef1a3b838c7eb6d330c (patch) | |
tree | ff9e17d0fd00585bc1e329a63c20f90d155b4ea8 /Makefile | |
parent | 343bffafecd4329ce5ae6625fc6b2c1ea9759f36 (diff) | |
download | libbu++-df6a899ad6c9a1c792582ef1a3b838c7eb6d330c.tar.gz libbu++-df6a899ad6c9a1c792582ef1a3b838c7eb6d330c.tar.bz2 libbu++-df6a899ad6c9a1c792582ef1a3b838c7eb6d330c.tar.xz libbu++-df6a899ad6c9a1c792582ef1a3b838c7eb6d330c.zip |
Rearranging some stuff.
Diffstat (limited to '')
-rw-r--r-- | Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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 | ||
8 | PREFIX := /home/eichlan/testroot | ||
8 | OBJECTS := $(patsubst %.cpp,%.o,$(wildcard src/stable/*.cpp src/unstable/*.cpp src/experimental/*.cpp)) | 9 | OBJECTS := $(patsubst %.cpp,%.o,$(wildcard src/stable/*.cpp src/unstable/*.cpp src/experimental/*.cpp)) |
9 | HEADERS := 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)) | 10 | HEADERS := 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)) |
10 | TOOLS := $(patsubst src/tools/%.cpp,%,$(wildcard src/tools/*.cpp)) | 11 | TOOLS := $(patsubst src/tools/%.cpp,%,$(wildcard src/tools/*.cpp)) |
11 | UNITS := $(patsubst src/unit/%.unit,unit/%,$(wildcard src/unit/*.unit)) | 12 | UNITS := $(patsubst src/unit/%.unit,unit/%,$(wildcard src/unit/*.unit)) |
12 | TESTS := $(patsubst src/tests/%.cpp,tests/%,$(wildcard src/tests/*.cpp)) | 13 | TESTS := $(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 | ||
16 | default: libbu++.a tools | 17 | default: libbu++.a tools |
17 | 18 | ||
18 | all: default tests | 19 | all: default tests |
19 | 20 | ||
21 | install: 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 | |||
20 | tests: ${UNITS} ${TESTS} | 28 | tests: ${UNITS} ${TESTS} |
21 | 29 | ||
22 | clean: | 30 | clean: |
@@ -49,7 +57,7 @@ src/autoconfig.h src/version.h: autoconfig | |||
49 | src/signals.h: pregen/signals.h | 57 | src/signals.h: pregen/signals.h |
50 | cp $< $@ | 58 | cp $< $@ |
51 | 59 | ||
52 | headers: ${HEADERS} | 60 | headers: bu ${HEADERS} |
53 | 61 | ||
54 | tools: ${TOOLS} | 62 | tools: ${TOOLS} |
55 | 63 | ||
@@ -93,6 +101,6 @@ tests/lzma: | |||
93 | tests/threadid: | 101 | tests/threadid: |
94 | g++ -ggdb -W -Wall -I. -L. $< -o $@ -lbu++ -lpthread | 102 | g++ -ggdb -W -Wall -I. -L. $< -o $@ -lbu++ -lpthread |
95 | 103 | ||
96 | libbu++.a: ${HEADERS} ${OBJECTS} | 104 | libbu++.a: bu ${HEADERS} ${OBJECTS} |
97 | ar -r libbu++.a ${OBJECTS} | 105 | ar -r libbu++.a ${OBJECTS} |
98 | 106 | ||