2008-11-02 13:15:57 +01:00
|
|
|
TARGET = torrent-stats
|
2007-05-15 17:39:34 +02:00
|
|
|
|
2008-11-02 13:15:57 +01:00
|
|
|
CFLAGS = -Wall -O2 -MD -MP -MF $(*F).d
|
2007-05-15 17:39:34 +02:00
|
|
|
|
2008-11-02 13:15:57 +01:00
|
|
|
# ------
|
2007-05-15 17:39:34 +02:00
|
|
|
|
2008-11-02 13:15:57 +01:00
|
|
|
SRC := $(wildcard *.c)
|
2007-05-15 17:39:34 +02:00
|
|
|
|
2008-11-02 13:15:57 +01:00
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
$(TARGET): $(SRC:.c=.o)
|
|
|
|
@echo " Linking file: $@"
|
|
|
|
@$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) > /dev/null
|
2007-05-15 17:39:34 +02:00
|
|
|
|
2008-11-02 13:15:57 +01:00
|
|
|
%.o: %.c
|
|
|
|
@echo " Building file: $<"
|
|
|
|
@$(CC) -c $(CFLAGS) $< -o $@
|
2007-05-15 17:39:34 +02:00
|
|
|
|
|
|
|
clean:
|
2009-05-03 14:20:03 +02:00
|
|
|
rm -rf $(TARGET) *.o *.d $(TARGET).log $(TARGET).pid
|
2007-05-15 17:39:34 +02:00
|
|
|
|
2009-02-25 14:17:23 +01:00
|
|
|
-include $(shell find . -name \*.d 2> /dev/null)
|