source: releases/0.9.0/Makefile @ 148

Last change on this file since 148 was 111, checked in by tim, 17 years ago

Switched license to GPLv3

Added early version of new tool, reglookup-recover

Many library changes made to support this new tool

  • Property svn:keywords set to Id
File size: 979 bytes
Line 
1# $Id: Makefile 111 2008-05-01 04:06:22Z 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
14INC=-I/usr/local/include
15LIB=-L/usr/local/lib -lm
16
17UNAME := $(shell uname)
18ifneq ($(UNAME),Linux) 
19  LIB:=$(LIB) -liconv
20endif
21
22BUILD=$(CURDIR)/build
23BUILD_BIN=$(BUILD)/bin
24BUILD_DOC=$(BUILD)/doc
25
26BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC)
27SUB_DIRS=lib src doc bin
28
29FILES=$(REGLOOKUP)
30.PHONY: $(SUB_DIRS) clean
31export
32
33
34all: $(BUILD_TREE) $(SUB_DIRS)
35
36#XXX: This should be more generalized.
37install: all
38        mkdir -p $(BIN_PREFIX)
39        mkdir -p $(DOC_PREFIX)
40        mkdir -p $(MAN_PREFIX)/man1
41        $(MAKE) -C bin install
42        $(MAKE) -C src install
43        $(MAKE) -C doc install
44
45
46$(SUB_DIRS):
47        $(MAKE) -C $@
48
49$(BUILD_TREE):
50        mkdir -p $@
51
52clean:
53        $(MAKE) -C src clean
54        $(MAKE) -C lib clean
55        rm -rf $(BUILD)/*
Note: See TracBrowser for help on using the repository browser.