Makefile 284 B

123456789101112131415161718192021
  1. LIBS=-ljump -lm
  2. LDFLAGS=-L..
  3. UNAME_S := $(shell uname -s)
  4. ifeq ($(UNAME_S), Linux)
  5. LDFLAGS+=-Wl,-rpath -Wl,'$${ORIGIN}/..'
  6. endif
  7. CFLAGS=-I..
  8. include ../dylib.make
  9. demo: main.o ../$(DYLIB)
  10. cc -o $@ $(LDFLAGS) $< $(LIBS)
  11. main.o: main.c
  12. .PHONY: clean
  13. clean:
  14. rm -vf demo main.o