source: trunk/Makefile @ 22

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

Moved release packaging target to higher-level Makefile outside of specific release.

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