~akkartik/basic-test

basic-test/makefile -rw-r--r-- 462 bytes View raw
3a8f345c — Kartik Agaram work around sr.ht 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CFLAGS ?= -g -O3

a.out: *.c *.h function_list test_list test_name_list
	${CC} ${CFLAGS} *.c

function_list: *.c
	grep -h "^[^ #].*) {" *.c  |sed 's/ {.*/;/' > function_list

test_list: *.c
	grep -h "^\s*void test_" *.c  |sed 's/^\s*void \(.*\)(void) {.*/\1,/' > test_list

test_name_list: *.c
	grep -h "^\s*void test_" *.c  |sed 's/^\s*void \(.*\)(void) {.*/"\1",/' > test_name_list

.PHONY: clean

clean:
	-rm -rf a.out* function_list test_list test_name_list