PROJECT=notifylist CC=gcc CXX=g++ CFLAGS=-g3 LDFLAGS= SOURCES=$(wildcard *.c) OBJECTS=$(SOURCES:.c=.o) INCLUDE=-I./extlib/ all: createextlib $(OBJECTS) $(PROJECT) $(PROJECT): $(SOURCES) notifylist.c $(CXX) $(INCLUDE) -c notifylist.c $(CC) $(OBJECTS) $(CFLAGS) $(LDFLAGS) -o $(PROJECT) %.o: %.c @echo $@ @$(CXX) $(CFLAGS) $(INCLUDE) -c $< -o $(subst .c,.o,$<) EXTLIB_SOURCES=$(wildcard extlib/*.c) EXTLIB_OBJECTS=$(EXTLIB_SOURCES:.c=.o) OBJECTS+=$(EXTLIB_OBJECTS) createextlib: $(EXTLIB_OBJECTS) #asd clean: rm -f $(PROJECT) *.o extlib/*.o