Last change
on this file since 143 was
143,
checked in by tim, 16 years ago
|
fixed a null pointer exception
removed some dependencies on less portable items
altered Makefiles to allow for MinGW cross compiling
|
-
Property svn:keywords set to
Id
|
File size:
1.2 KB
|
Rev | Line | |
---|
[13] | 1 | # $Id: Makefile 143 2009-02-13 03:24:27Z 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 |
---|
[143] | 17 | BIN_EXT= |
---|
| 18 | EXTRA_OBJ= |
---|
[5] | 19 | |
---|
[73] | 20 | UNAME := $(shell uname) |
---|
[88] | 21 | ifneq ($(UNAME),Linux) |
---|
[74] | 22 | LIB:=$(LIB) -liconv |
---|
[73] | 23 | endif |
---|
| 24 | |
---|
[143] | 25 | ifdef BUILD_MINGW |
---|
| 26 | CC=i586-mingw32msvc-cc |
---|
| 27 | BIN_EXT=.exe |
---|
| 28 | LIBICONV_PATH=/usr/local/src/libiconv-1.9.2-1-lib |
---|
| 29 | INC:=$(INC) -I$(LIBICONV_PATH)/include |
---|
| 30 | EXTRA_OBJ=$(LIBICONV_PATH)/lib/libiconv.dll.a |
---|
| 31 | endif |
---|
| 32 | |
---|
[5] | 33 | BUILD=$(CURDIR)/build |
---|
| 34 | BUILD_BIN=$(BUILD)/bin |
---|
[9] | 35 | BUILD_DOC=$(BUILD)/doc |
---|
[5] | 36 | |
---|
[21] | 37 | BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC) |
---|
[65] | 38 | SUB_DIRS=lib src doc bin |
---|
[5] | 39 | |
---|
| 40 | FILES=$(REGLOOKUP) |
---|
| 41 | .PHONY: $(SUB_DIRS) clean |
---|
| 42 | export |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | all: $(BUILD_TREE) $(SUB_DIRS) |
---|
| 46 | |
---|
[20] | 47 | #XXX: This should be more generalized. |
---|
[11] | 48 | install: all |
---|
[13] | 49 | mkdir -p $(BIN_PREFIX) |
---|
| 50 | mkdir -p $(DOC_PREFIX) |
---|
[20] | 51 | mkdir -p $(MAN_PREFIX)/man1 |
---|
[67] | 52 | $(MAKE) -C bin install |
---|
[26] | 53 | $(MAKE) -C src install |
---|
[25] | 54 | $(MAKE) -C doc install |
---|
[11] | 55 | |
---|
[13] | 56 | |
---|
[5] | 57 | $(SUB_DIRS): |
---|
| 58 | $(MAKE) -C $@ |
---|
| 59 | |
---|
| 60 | $(BUILD_TREE): |
---|
| 61 | mkdir -p $@ |
---|
| 62 | |
---|
| 63 | clean: |
---|
[39] | 64 | $(MAKE) -C src clean |
---|
| 65 | $(MAKE) -C lib clean |
---|
[5] | 66 | rm -rf $(BUILD)/* |
---|
Note: See
TracBrowser
for help on using the repository browser.