source: trunk/Makefile @ 156

Last change on this file since 156 was 147, checked in by tim, 16 years ago

added talloc library

incorporated talloc into winsec and lru_cache modules

introduced talloc into SK caching system

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1# $Id: Makefile 147 2009-02-22 19:31:52Z tim $
2
3# Installation prefixes.  Change to install elsewhere.
4
5PREFIX=/usr/local
6BIN_PREFIX=$(PREFIX)/bin
7DOC_PREFIX=$(PREFIX)/share/doc/reglookup
8MAN_PREFIX=$(PREFIX)/man
9
10################################################################################
11
12CC=gcc
13OPTS=-std=gnu89 -pedantic -Wall -ggdb
14#OPTS=-std=gnu89 -pedantic -Wall
15INC:=-I$(PWD)/include -I/usr/local/include
16LIB=-L/usr/local/lib -lm
17BIN_EXT=
18EXTRA_OBJ=
19
20UNAME := $(shell uname)
21ifneq ($(UNAME),Linux) 
22  LIB:=$(LIB) -liconv
23endif
24
25
26################################################################################
27# MinGW cross-compiling build settings
28ifdef BUILD_MINGW
29
30## These may need to be changed
31CC=i586-mingw32msvc-cc
32LIBICONV_PATH=/usr/local/src/libiconv-1.9.2-1-lib
33
34## These probably do not need to be changed
35BIN_EXT=.exe
36INC:=$(INC) -I$(LIBICONV_PATH)/include
37EXTRA_OBJ=$(LIBICONV_PATH)/lib/libiconv.dll.a
38
39endif
40################################################################################
41
42
43BUILD=$(CURDIR)/build
44BUILD_BIN=$(BUILD)/bin
45BUILD_DOC=$(BUILD)/doc
46
47BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC)
48SUB_DIRS=lib src doc bin
49
50FILES=$(REGLOOKUP)
51.PHONY: $(SUB_DIRS) clean
52export
53
54
55all: $(BUILD_TREE) $(SUB_DIRS)
56
57#XXX: This should be more generalized.
58install: all
59        mkdir -p $(BIN_PREFIX)
60        mkdir -p $(DOC_PREFIX)
61        mkdir -p $(MAN_PREFIX)/man1
62        $(MAKE) -C bin install
63        $(MAKE) -C src install
64        $(MAKE) -C doc install
65
66
67$(SUB_DIRS):
68        $(MAKE) -C $@
69
70$(BUILD_TREE):
71        mkdir -p $@
72
73clean:
74        $(MAKE) -C src clean
75        $(MAKE) -C lib clean
76        rm -rf $(BUILD)/*
Note: See TracBrowser for help on using the repository browser.