Last change
on this file since 141 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
|
Rev | Line | |
---|
[13] | 1 | # $Id: Makefile 141 2009-02-10 02:35:24Z tim $ |
---|
[5] | 2 | |
---|
[13] | 3 | # Installation prefixes. Change to install elsewhere. |
---|
[5] | 4 | |
---|
| 5 | PREFIX=/usr/local |
---|
[13] | 6 | BIN_PREFIX=$(PREFIX)/bin |
---|
| 7 | DOC_PREFIX=$(PREFIX)/share/doc/reglookup |
---|
| 8 | MAN_PREFIX=$(PREFIX)/man |
---|
[5] | 9 | |
---|
| 10 | ################################################################################ |
---|
| 11 | |
---|
| 12 | CC=gcc |
---|
[141] | 13 | #OPTS=-std=gnu89 -pedantic -Wall -ggdb |
---|
| 14 | OPTS=-std=gnu89 -pedantic -Wall |
---|
[73] | 15 | INC=-I/usr/local/include |
---|
[98] | 16 | LIB=-L/usr/local/lib -lm |
---|
[5] | 17 | |
---|
[73] | 18 | UNAME := $(shell uname) |
---|
[88] | 19 | ifneq ($(UNAME),Linux) |
---|
[74] | 20 | LIB:=$(LIB) -liconv |
---|
[73] | 21 | endif |
---|
| 22 | |
---|
[5] | 23 | BUILD=$(CURDIR)/build |
---|
| 24 | BUILD_BIN=$(BUILD)/bin |
---|
[9] | 25 | BUILD_DOC=$(BUILD)/doc |
---|
[5] | 26 | |
---|
[21] | 27 | BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC) |
---|
[65] | 28 | SUB_DIRS=lib src doc bin |
---|
[5] | 29 | |
---|
| 30 | FILES=$(REGLOOKUP) |
---|
| 31 | .PHONY: $(SUB_DIRS) clean |
---|
| 32 | export |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | all: $(BUILD_TREE) $(SUB_DIRS) |
---|
| 36 | |
---|
[20] | 37 | #XXX: This should be more generalized. |
---|
[11] | 38 | install: all |
---|
[13] | 39 | mkdir -p $(BIN_PREFIX) |
---|
| 40 | mkdir -p $(DOC_PREFIX) |
---|
[20] | 41 | mkdir -p $(MAN_PREFIX)/man1 |
---|
[67] | 42 | $(MAKE) -C bin install |
---|
[26] | 43 | $(MAKE) -C src install |
---|
[25] | 44 | $(MAKE) -C doc install |
---|
[11] | 45 | |
---|
[13] | 46 | |
---|
[5] | 47 | $(SUB_DIRS): |
---|
| 48 | $(MAKE) -C $@ |
---|
| 49 | |
---|
| 50 | $(BUILD_TREE): |
---|
| 51 | mkdir -p $@ |
---|
| 52 | |
---|
| 53 | clean: |
---|
[39] | 54 | $(MAKE) -C src clean |
---|
| 55 | $(MAKE) -C lib clean |
---|
[5] | 56 | rm -rf $(BUILD)/* |
---|
Note: See
TracBrowser
for help on using the repository browser.