diff --git a/Makefile b/Makefile index e98b796..5cdc68e 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,17 @@ $(OUT): input.o exec.o tests: $(TESTS) 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) $(CC) -Wall $(TEST_EXEC) -o test/exec