Last change
on this file since 191 was
23,
checked in by tim, 20 years ago
|
fixed bug in build system
removed -ggdb option
|
-
Property svn:keywords set to
Id
|
File size:
887 bytes
|
Line | |
---|
1 | # $Id: Makefile 23 2005-06-08 01:19:46Z tim $ |
---|
2 | |
---|
3 | # Installation prefixes. Change to install elsewhere. |
---|
4 | |
---|
5 | PREFIX=/usr/local |
---|
6 | BIN_PREFIX=$(PREFIX)/bin |
---|
7 | DOC_PREFIX=$(PREFIX)/share/doc/reglookup |
---|
8 | MAN_PREFIX=$(PREFIX)/man |
---|
9 | |
---|
10 | ################################################################################ |
---|
11 | |
---|
12 | CC=gcc |
---|
13 | OPTS=-std=gnu89 -pedantic -Wall |
---|
14 | |
---|
15 | BUILD=$(CURDIR)/build |
---|
16 | BUILD_BIN=$(BUILD)/bin |
---|
17 | BUILD_DOC=$(BUILD)/doc |
---|
18 | |
---|
19 | BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC) |
---|
20 | SUB_DIRS=src doc |
---|
21 | |
---|
22 | FILES=$(REGLOOKUP) |
---|
23 | .PHONY: $(SUB_DIRS) clean |
---|
24 | export |
---|
25 | |
---|
26 | |
---|
27 | all: $(BUILD_TREE) $(SUB_DIRS) |
---|
28 | |
---|
29 | #XXX: This should be more generalized. |
---|
30 | install: all |
---|
31 | mkdir -p $(BIN_PREFIX) |
---|
32 | mkdir -p $(DOC_PREFIX) |
---|
33 | mkdir -p $(MAN_PREFIX)/man1 |
---|
34 | cp -r $(BUILD_BIN)/* $(BIN_PREFIX) |
---|
35 | cp -r $(BUILD_DOC)/* $(DOC_PREFIX) |
---|
36 | # Possibly move it to doc/Makefile |
---|
37 | cp -sf $(DOC_PREFIX)/man/man1/* $(MAN_PREFIX)/man1 |
---|
38 | |
---|
39 | |
---|
40 | $(SUB_DIRS): |
---|
41 | $(MAKE) -C $@ |
---|
42 | |
---|
43 | $(BUILD_TREE): |
---|
44 | mkdir -p $@ |
---|
45 | |
---|
46 | clean: |
---|
47 | rm -rf $(BUILD)/* |
---|
48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.