baum

diff Makefile @ 0:2f71d692d4f9

initial commit
author meillo@marmaro.de
date Thu, 07 Feb 2008 12:51:54 +0100
parents
children 557fa4df2bcd
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Thu Feb 07 12:51:54 2008 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +# common makefile
     1.5 +
     1.6 +# program
     1.7 +PROGRAM = baum
     1.8 +SRC = baum.c
     1.9 +OBJ = ${SRC:.c=.o}
    1.10 +DEP =
    1.11 +
    1.12 +# compile env
    1.13 +CC = gcc
    1.14 +LD = ${CC}
    1.15 +DEBUG = -g
    1.16 +CFLAGS = -Wall -c ${DEBUG}
    1.17 +LFLAGS = -Wall ${DEBUG}
    1.18 +
    1.19 +####
    1.20 +
    1.21 +all: options ${PROGRAM}
    1.22 +
    1.23 +options:
    1.24 +	@echo build options:
    1.25 +	@echo "CC     = ${CC}"
    1.26 +	@echo "LD     = ${LD}"
    1.27 +	@echo "CFLAGS = ${CFLAGS}"
    1.28 +	@echo "LFLAGS = ${LFLAGS}"
    1.29 +	@echo
    1.30 +
    1.31 +.cpp.o:
    1.32 +	$(CC) $(CFLAGS) $<
    1.33 +
    1.34 +${OBJ}: ${DEP}
    1.35 +
    1.36 +${PROGRAM}: ${OBJ}
    1.37 +	$(LD) $(LFLAGS) ${OBJ} -o $@
    1.38 +
    1.39 +debug: all
    1.40 +	gdb ${PROGRAM}
    1.41 +
    1.42 +strip: ${PROGRAM}
    1.43 +	@echo stripping ${PROGRAM}
    1.44 +	@strip ${PROGRAM}
    1.45 +
    1.46 +tar: clean
    1.47 +	@echo creating archive
    1.48 +	@tar -czvf ${PROGRAM}.tar.gz *
    1.49 +
    1.50 +clean:
    1.51 +	@echo cleaning
    1.52 +	@rm -f ${PROGRAM} ${OBJ}
    1.53 +
    1.54 +.PHONY: all options debug strip tar clean