Last change
on this file since 200 was
141,
checked in by tim, 16 years ago
|
improved details of an error message
turned off debugging symbols in Makefile
|
-
Property svn:keywords set to
Id
|
File size:
1012 bytes
|
Line | |
---|
1 | # $Id: Makefile 141 2009-02-10 02:35:24Z 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 -ggdb |
---|
14 | OPTS=-std=gnu89 -pedantic -Wall |
---|
15 | INC=-I/usr/local/include |
---|
16 | LIB=-L/usr/local/lib -lm |
---|
17 | |
---|
18 | UNAME := $(shell uname) |
---|
19 | ifneq ($(UNAME),Linux) |
---|
20 | LIB:=$(LIB) -liconv |
---|
21 | endif |
---|
22 | |
---|
23 | BUILD=$(CURDIR)/build |
---|
24 | BUILD_BIN=$(BUILD)/bin |
---|
25 | BUILD_DOC=$(BUILD)/doc |
---|
26 | |
---|
27 | BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC) |
---|
28 | SUB_DIRS=lib src doc bin |
---|
29 | |
---|
30 | FILES=$(REGLOOKUP) |
---|
31 | .PHONY: $(SUB_DIRS) clean |
---|
32 | export |
---|
33 | |
---|
34 | |
---|
35 | all: $(BUILD_TREE) $(SUB_DIRS) |
---|
36 | |
---|
37 | #XXX: This should be more generalized. |
---|
38 | install: all |
---|
39 | mkdir -p $(BIN_PREFIX) |
---|
40 | mkdir -p $(DOC_PREFIX) |
---|
41 | mkdir -p $(MAN_PREFIX)/man1 |
---|
42 | $(MAKE) -C bin install |
---|
43 | $(MAKE) -C src install |
---|
44 | $(MAKE) -C doc install |
---|
45 | |
---|
46 | |
---|
47 | $(SUB_DIRS): |
---|
48 | $(MAKE) -C $@ |
---|
49 | |
---|
50 | $(BUILD_TREE): |
---|
51 | mkdir -p $@ |
---|
52 | |
---|
53 | clean: |
---|
54 | $(MAKE) -C src clean |
---|
55 | $(MAKE) -C lib clean |
---|
56 | rm -rf $(BUILD)/* |
---|
Note: See
TracBrowser
for help on using the repository browser.