Changeset 3 for src/Makefile


Ignore:
Timestamp:
02/17/05 22:59:23 (20 years ago)
Author:
tim
Message:

expanded makefile to compile into build/ (more to come)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Makefile

    r2 r3  
    11# $Id$
    22
     3# Installation prefix.  Change to install elsewhere
     4#  XXX: installation not yet implemented
     5
     6PREFIX=/usr/local
     7
     8################################################################################
     9
     10CC=gcc
    311OPTS=-ggdb -std=gnu89 -pedantic -Wall
     12#OPTS=-std=gnu89 -pedantic -Wall
    413
    5 all: reglookup
     14BUILD=../build
     15BUILD_BIN=$(BUILD)/bin
     16BUILD_ETC=$(BUILD)/etc
     17BUILD_DIRS=$(BUILD_BIN) $(BUILD_ETC)
    618
    7 reglookup: reglookup.c
    8         gcc $(OPTS) -o reglookup reglookup.c
     19REGLOOKUP=$(BUILD)/bin/reglookup
     20FILES=$(REGLOOKUP)
     21
     22all: $(BUILD_DIRS) $(FILES)
     23
     24$(BUILD_DIRS):
     25        mkdir -p $@
     26
     27$(REGLOOKUP): reglookup.c
     28        $(CC) $(OPTS) -o $@ reglookup.c
    929
    1030clean:
    11         rm -f reglookup
     31        rm -rf $(BUILD)/*
Note: See TracChangeset for help on using the changeset viewer.