turn amalgamation into two files
This commit is contained in:
parent
dea5819d67
commit
8fceba6758
11
Makefile
11
Makefile
|
@ -6,6 +6,17 @@ $(OUT): input.o exec.o
|
||||||
tests: $(TESTS)
|
tests: $(TESTS)
|
||||||
for i in $(TESTS); do ./$$i -v; done
|
for i in $(TESTS); do ./$$i -v; done
|
||||||
|
|
||||||
|
libscomm_amalg.h: exec.h input.h
|
||||||
|
echo '#pragma once' > libscomm_amalg.h
|
||||||
|
cat input.h exec.h | \
|
||||||
|
sed 's/#pragma .*//g; s/#include ".*//g' \
|
||||||
|
>> libscomm_amalg.h
|
||||||
|
|
||||||
|
libscomm_amalg.c: exec.c input.c libscomm_amalg.h
|
||||||
|
echo '#include "libscomm_amalg.h"' > libscomm_amalg.c
|
||||||
|
cat exec.c input.c | sed 's/#include ".*//g' \
|
||||||
|
>> libscomm_amalg.c
|
||||||
|
|
||||||
TEST_EXEC=test/exec.o exec.o
|
TEST_EXEC=test/exec.o exec.o
|
||||||
test/exec: $(TEST_EXEC)
|
test/exec: $(TEST_EXEC)
|
||||||
$(CC) -Wall $(TEST_EXEC) -o test/exec
|
$(CC) -Wall $(TEST_EXEC) -o test/exec
|
||||||
|
|
Loading…
Reference in New Issue