From 1eccffca720cf28cc6e0fba9fd087ccd5332c95f Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 29 Oct 2017 01:34:30 +0330 Subject: forgot this one --- bfd/test/makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 bfd/test/makefile (limited to 'bfd/test/makefile') diff --git a/bfd/test/makefile b/bfd/test/makefile new file mode 100644 index 0000000..ca1eab1 --- /dev/null +++ b/bfd/test/makefile @@ -0,0 +1,30 @@ + +##################################VARS################################# +CC=clang +CC_FLAGS=-fpic +LD_FLAGS= -l bfd +TARGET=test +##################################RULES################################ +.DEFAULT:all + +.PHONY:all clean help $(TARGET) + +all:$(TARGET) $(TARGET).so + +.c.o: + $(CC) $(CC_FLAGS) -c $< -o $@ + +$(TARGET): $(TARGET).o + $(CC) $^ $(LD_FLAGS) -o $@ + +$(TARGET).so: $(TARGET).o + $(CC) $^ $(LD_FLAGS) -shared -o $@ + +clean: + rm -f *.o *~ $(TARGET) $(TARGET).so + +help: + @echo 'all builds so and exe. all is the default.' + @echo 'clean runs clean.' + @echo 'help runs help.' + -- cgit v1.2.3