diff options
Diffstat (limited to '')
-rw-r--r-- | bfd/test/makefile | 30 |
1 files changed, 30 insertions, 0 deletions
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.' + |