source: trunk/Makefile @ 23

Last change on this file since 23 was 23, checked in by tim, 19 years ago

fixed bug in build system

removed -ggdb option

  • Property svn:keywords set to Id
File size: 887 bytes
RevLine 
[13]1# $Id: Makefile 23 2005-06-08 01:19:46Z 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
[23]13OPTS=-std=gnu89 -pedantic -Wall
[5]14
15BUILD=$(CURDIR)/build
16BUILD_BIN=$(BUILD)/bin
[9]17BUILD_DOC=$(BUILD)/doc
[5]18
[21]19BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC)
[9]20SUB_DIRS=src doc
[5]21
22FILES=$(REGLOOKUP)
23.PHONY: $(SUB_DIRS) clean
24export
25
26
27all: $(BUILD_TREE) $(SUB_DIRS)
28
[20]29#XXX: This should be more generalized.
[11]30install: all
[13]31        mkdir -p $(BIN_PREFIX)
32        mkdir -p $(DOC_PREFIX)
[20]33        mkdir -p $(MAN_PREFIX)/man1
[13]34        cp -r $(BUILD_BIN)/* $(BIN_PREFIX)
35        cp -r $(BUILD_DOC)/* $(DOC_PREFIX)
36        #     Possibly move it to doc/Makefile
[14]37        cp -sf $(DOC_PREFIX)/man/man1/*  $(MAN_PREFIX)/man1
[11]38
[13]39
[5]40$(SUB_DIRS):
41        $(MAKE) -C $@
42
43$(BUILD_TREE):
44        mkdir -p $@
45
46clean:
47        rm -rf $(BUILD)/*
[11]48
Note: See TracBrowser for help on using the repository browser.