Mercurial > baum
view Makefile @ 0:2f71d692d4f9
initial commit
author | meillo@marmaro.de |
---|---|
date | Thu, 07 Feb 2008 12:51:54 +0100 |
parents | |
children | 557fa4df2bcd |
line wrap: on
line source
# common makefile # program PROGRAM = baum SRC = baum.c OBJ = ${SRC:.c=.o} DEP = # 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