1 #!/usr/bin/make -f 2 3 ARGTABLE_SRC = $(wildcard *.c) 4 ARGTABLE_OBJ = $(ARGTABLE_SRC:.c=.o) 5 6 ARGTABLE_LIB = libargtable3.a 7 8 $(ARGTABLE_OBJ): %.o: %.c 9 $(CC) -o $@ -c $(CFLAGS) $< 10 11 $(ARGTABLE_LIB): $(ARGTABLE_OBJ) 12 $(AR) rc $@ $^ 13 $(RANLIB) $@ 14 15 build: all 16 17 all: $(ARGTABLE_LIB) 18 19 install: 20 21 clean: 22 rm -f $(ARGTABLE_OBJ) $(ARGTABLE_LIB) 23