# $Id: Makefile 36 2005-07-31 01:46:51Z tim $ # Installation prefixes. Change to install elsewhere. PREFIX=/usr/local BIN_PREFIX=$(PREFIX)/bin DOC_PREFIX=$(PREFIX)/share/doc/reglookup MAN_PREFIX=$(PREFIX)/man ################################################################################ CC=gcc OPTS=-std=gnu89 -pedantic -Wall BUILD=$(CURDIR)/build BUILD_BIN=$(BUILD)/bin BUILD_DOC=$(BUILD)/doc BUILD_TREE=$(BUILD_BIN) $(BUILD_DOC) SUB_DIRS=lib src doc FILES=$(REGLOOKUP) .PHONY: $(SUB_DIRS) clean export all: $(BUILD_TREE) $(SUB_DIRS) #XXX: This should be more generalized. install: all mkdir -p $(BIN_PREFIX) mkdir -p $(DOC_PREFIX) mkdir -p $(MAN_PREFIX)/man1 $(MAKE) -C src install $(MAKE) -C doc install $(SUB_DIRS): $(MAKE) -C $@ $(BUILD_TREE): mkdir -p $@ clean: rm -rf $(BUILD)/*