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
|
Line | |
---|
1 | # $Id: Makefile 143 2009-02-13 03:24:27Z 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 | BIN_EXT= |
---|
18 | EXTRA_OBJ= |
---|
19 | |
---|
20 | UNAME := $(shell uname) |
---|
21 | ifneq ($(UNAME),Linux) |
---|
22 | LIB:=$(LIB) -liconv |
---|
23 | endif |
---|
24 | |
---|
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 | |
---|
33 | BUILD=$(CURDIR)/build |
---|
34 | BUILD_BIN=$(BUILD)/bin |
---|
35 | BUILD_DOC=$(BUILD)/doc |
---|
36 | |
---|
37 | BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC) |
---|
38 | SUB_DIRS=lib src doc bin |
---|
39 | |
---|
40 | FILES=$(REGLOOKUP) |
---|
41 | .PHONY: $(SUB_DIRS) clean |
---|
42 | export |
---|
43 | |
---|
44 | |
---|
45 | all: $(BUILD_TREE) $(SUB_DIRS) |
---|
46 | |
---|
47 | #XXX: This should be more generalized. |
---|
48 | install: all |
---|
49 | mkdir -p $(BIN_PREFIX) |
---|
50 | mkdir -p $(DOC_PREFIX) |
---|
51 | mkdir -p $(MAN_PREFIX)/man1 |
---|
52 | $(MAKE) -C bin install |
---|
53 | $(MAKE) -C src install |
---|
54 | $(MAKE) -C doc install |
---|
55 | |
---|
56 | |
---|
57 | $(SUB_DIRS): |
---|
58 | $(MAKE) -C $@ |
---|
59 | |
---|
60 | $(BUILD_TREE): |
---|
61 | mkdir -p $@ |
---|
62 | |
---|
63 | clean: |
---|
64 | $(MAKE) -C src clean |
---|
65 | $(MAKE) -C lib clean |
---|
66 | rm -rf $(BUILD)/* |
---|
Note: See
TracBrowser
for help on using the repository browser.