From 26e2a879bdefafee3bff0a41e1167cbf29b3ab3f Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Tue, 26 Jun 2018 15:06:55 +0430 Subject: first commit --- test/linker/makefile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 test/linker/makefile (limited to 'test/linker/makefile') diff --git a/test/linker/makefile b/test/linker/makefile new file mode 100644 index 0000000..1cc9413 --- /dev/null +++ b/test/linker/makefile @@ -0,0 +1,44 @@ +TARGET=file0 +CC=clang +CC?=clang +CC_FLAGS= +CC_EXTRA?= +CC_FLAGS+=$(CC_EXTRA) + +SRCS=$(wildcard *.c) +WASM=$(patsubst %.c, %.wasm, $(wildcard *.c)) + +.DEFAULT:all + +.PHONY:all clean help + +all:$(TARGET) wasmforce + +depend:.depend + +.depend:$(SRCS) + rm -rf .depend + $(CC) -MM $(CC_FLAGS) $^ > ./.depend + +-include ./.depend + +%.wasm:%.c + llvm-wasm $< + +wasmforce:$(WASM) + @echo forcing generation of wasm and wast + +.c.o: + $(CC) $(CC_FLAGS) -c $< -o $@ + +$(TARGET): $(TARGET).o + $(CC) $^ $(LD_FLAGS) -o $@ + +clean: + rm -f *.s *.wasm *.wast *.bc *.o *~ $(TARGET) + rm .depend + +help: + @echo "all is the default target" + @echo "there is delete." + @echo "there is clean." -- cgit v1.2.3