Last change
on this file since 148 was
88,
checked in by tim, 18 years ago
|
Fixed a lazy NULL printing to work properly on Solaris.
Switched reglookup exit codes to more standard ones.
Changed Makefile to default to using -liconv except on Linux, since Solaris needs this too.
|
-
Property svn:keywords set to
Id
|
File size:
969 bytes
|
Line | |
---|
1 | # $Id: Makefile 88 2007-03-07 01:35:18Z 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 | INC=-I/usr/local/include |
---|
15 | LIB=-L/usr/local/lib |
---|
16 | |
---|
17 | UNAME := $(shell uname) |
---|
18 | ifneq ($(UNAME),Linux) |
---|
19 | LIB:=$(LIB) -liconv |
---|
20 | endif |
---|
21 | |
---|
22 | BUILD=$(CURDIR)/build |
---|
23 | BUILD_BIN=$(BUILD)/bin |
---|
24 | BUILD_DOC=$(BUILD)/doc |
---|
25 | |
---|
26 | BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC) |
---|
27 | SUB_DIRS=lib src doc bin |
---|
28 | |
---|
29 | FILES=$(REGLOOKUP) |
---|
30 | .PHONY: $(SUB_DIRS) clean |
---|
31 | export |
---|
32 | |
---|
33 | |
---|
34 | all: $(BUILD_TREE) $(SUB_DIRS) |
---|
35 | |
---|
36 | #XXX: This should be more generalized. |
---|
37 | install: all |
---|
38 | mkdir -p $(BIN_PREFIX) |
---|
39 | mkdir -p $(DOC_PREFIX) |
---|
40 | mkdir -p $(MAN_PREFIX)/man1 |
---|
41 | $(MAKE) -C bin install |
---|
42 | $(MAKE) -C src install |
---|
43 | $(MAKE) -C doc install |
---|
44 | |
---|
45 | |
---|
46 | $(SUB_DIRS): |
---|
47 | $(MAKE) -C $@ |
---|
48 | |
---|
49 | $(BUILD_TREE): |
---|
50 | mkdir -p $@ |
---|
51 | |
---|
52 | clean: |
---|
53 | $(MAKE) -C src clean |
---|
54 | $(MAKE) -C lib clean |
---|
55 | rm -rf $(BUILD)/* |
---|
Note: See
TracBrowser
for help on using the repository browser.