amalgamation: add version
This commit is contained in:
parent
8fceba6758
commit
d5b47632b5
5
Makefile
5
Makefile
|
@ -1,6 +1,8 @@
|
|||
OUT=libscomp.a
|
||||
VERSION=0.1.0
|
||||
TESTS=test/input test/exec
|
||||
|
||||
all: $(OUT) libscomm_amalg.c libscomm_amalg.h
|
||||
$(OUT): input.o exec.o
|
||||
$(AR) rcs $(OUT) input.o exec.o
|
||||
tests: $(TESTS)
|
||||
|
@ -8,11 +10,12 @@ tests: $(TESTS)
|
|||
|
||||
libscomm_amalg.h: exec.h input.h
|
||||
echo '#pragma once' > libscomm_amalg.h
|
||||
echo '#define LIBSCOMM_VERSION "${VERSION}"' >> 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
|
||||
libscomm_amalg.c: exec.c input.c
|
||||
echo '#include "libscomm_amalg.h"' > libscomm_amalg.c
|
||||
cat exec.c input.c | sed 's/#include ".*//g' \
|
||||
>> libscomm_amalg.c
|
||||
|
|
Loading…
Reference in New Issue