source: releases/0.10.0/Makefile @ 289

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