view Makefile @ 9:c020b0d1cfca

read input is now finished in first version; removed init; added push and pull; name is now array instead of pointer
author meillo@marmaro.de
date Sat, 09 Feb 2008 16:41:41 +0100
parents 557fa4df2bcd
children 3c64b5ac821b
line wrap: on
line source

# common makefile

# program
PROGRAM = baum
SRC = baum.c actions.c
OBJ = ${SRC:.c=.o}
DEP = baum.h actions.h

# compile env
CC = gcc
LD = ${CC}
DEBUG = -g
CFLAGS = -Wall -c ${DEBUG}
LFLAGS = -Wall ${DEBUG}

####

all: options ${PROGRAM}

options:
	@echo build options:
	@echo "CC     = ${CC}"
	@echo "LD     = ${LD}"
	@echo "CFLAGS = ${CFLAGS}"
	@echo "LFLAGS = ${LFLAGS}"
	@echo

.cpp.o:
	$(CC) $(CFLAGS) $<

${OBJ}: ${DEP}

${PROGRAM}: ${OBJ}
	$(LD) $(LFLAGS) ${OBJ} -o $@

debug: all
	gdb ${PROGRAM}

strip: ${PROGRAM}
	@echo stripping ${PROGRAM}
	@strip ${PROGRAM}

tar: clean
	@echo creating archive
	@tar -czvf ${PROGRAM}.tar.gz *

clean:
	@echo cleaning
	@rm -f ${PROGRAM} ${OBJ}

.PHONY: all options debug strip tar clean