Makefile 358 B

1234567891011121314151617181920212223
  1. #!/usr/bin/make -f
  2. DROPT_INCLUDE_DIR = ./include
  3. DROPT_SRC = $(wildcard ./src/*.c)
  4. DROPT_OBJ = $(DROPT_SRC:.c=.o)
  5. DROPT_LIB = ./src/libdropt.a
  6. $(DROPT_OBJ): %.o: %.c
  7. $(CC) -o $@ -c $(CFLAGS) -I$(DROPT_INCLUDE_DIR) $<
  8. $(DROPT_LIB): $(DROPT_OBJ)
  9. $(AR) rc $@ $^
  10. ranlib $@
  11. build: all
  12. all: $(DROPT_LIB)
  13. install:
  14. clean:
  15. rm -f $(DROPT_OBJ) $(DROPT_LIB)