CC = clang CFLAGS = -W -Wall AR = llvm-ar BDIR = ../bin LDIR = ../lib INCLUDES = -I ../include SRCS = cd-utils.c cd-discid.c OBJS = cd-utils.o cd-discid.o BIN = $(BDIR)/cd-discid LIB = $(LDIR)/libcd-utils.a all: $(LIB) $(BIN) $(LIB): $(OBJS) $(AR) rc $(LIB) $(OBJS) $(BIN): cd-discid.c $(CC) $(CFLAGS) $(INCLUDES) -DSTANDALONE -o $(BIN) cd-discid.c .c.o: $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ clean: rm -rf $(OBJS) clean-all: rm -rf $(OBJS) $(LIB) $(BIN)