Makefile (819B)
1 # See LICENSE file for copyright and license details. 2 # cstring tests 3 .POSIX: 4 5 BINS = test_basic test_insert 6 CC = cc 7 CFLAGS = -Wall -std=c99 -pedantic -O3 8 LDFLAGS = -Llib -L/usr/local/lib -I/usr/local/include -lcstring 9 10 all: options ${BINS} 11 12 options: 13 @echo "build options:" 14 @echo "CFLAGS = ${CFLAGS}" 15 @echo "LDFLAGS = ${LDFLAGS}" 16 @echo "CC = ${CC}" 17 18 run: 19 for bin in ${BINS}; do \ 20 echo "---------------------------"; \ 21 echo "---------------------------"; \ 22 echo "RUNNING: $${bin}"; \ 23 echo "---------------------------"; \ 24 echo "---------------------------"; \ 25 ./$${bin}; \ 26 done 27 28 clean: 29 rm -f ${BINS} *.o 30 31 test_basic: test_basic.c 32 ${CC} test_basic.c ${CFLAGS} -o test_basic ${LDFLAGS} 33 34 test_insert: test_insert.c 35 ${CC} test_insert.c ${CFLAGS} -o test_insert ${LDFLAGS} 36 37 .PHONY: all options run clean