source: trunk/Makefile @ 141

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
RevLine 
[13]1# $Id: Makefile 141 2009-02-10 02:35:24Z tim $
[5]2
[13]3# Installation prefixes.  Change to install elsewhere.
[5]4
5PREFIX=/usr/local
[13]6BIN_PREFIX=$(PREFIX)/bin
7DOC_PREFIX=$(PREFIX)/share/doc/reglookup
8MAN_PREFIX=$(PREFIX)/man
[5]9
10################################################################################
11
12CC=gcc
[141]13#OPTS=-std=gnu89 -pedantic -Wall -ggdb
14OPTS=-std=gnu89 -pedantic -Wall
[73]15INC=-I/usr/local/include
[98]16LIB=-L/usr/local/lib -lm
[5]17
[73]18UNAME := $(shell uname)
[88]19ifneq ($(UNAME),Linux) 
[74]20  LIB:=$(LIB) -liconv
[73]21endif
22
[5]23BUILD=$(CURDIR)/build
24BUILD_BIN=$(BUILD)/bin
[9]25BUILD_DOC=$(BUILD)/doc
[5]26
[21]27BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC)
[65]28SUB_DIRS=lib src doc bin
[5]29
30FILES=$(REGLOOKUP)
31.PHONY: $(SUB_DIRS) clean
32export
33
34
35all: $(BUILD_TREE) $(SUB_DIRS)
36
[20]37#XXX: This should be more generalized.
[11]38install: 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
53clean:
[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.