2012-02-11 12:44:02 +01:00
|
|
|
TARGET = twiboot
|
|
|
|
TARGET2 = mpmboot
|
2010-10-16 19:29:15 +02:00
|
|
|
|
|
|
|
CFLAGS = -Wall -Wno-unused-result -O2 -MMD -MP -MF $(*F).d
|
|
|
|
|
|
|
|
# ------
|
|
|
|
|
|
|
|
SRC := $(wildcard *.c)
|
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
$(TARGET): $(SRC:.c=.o)
|
|
|
|
@echo " Linking file: $@"
|
|
|
|
@$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) > /dev/null
|
2012-02-11 12:44:02 +01:00
|
|
|
@ln -sf $@ $(TARGET2)
|
2010-10-16 19:29:15 +02:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@echo " Building file: $<"
|
|
|
|
@$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
|
|
|
|
clean:
|
2012-02-11 12:44:02 +01:00
|
|
|
rm -rf $(TARGET) $(TARGET2) *.o *.d
|
2010-10-16 19:29:15 +02:00
|
|
|
|
|
|
|
-include $(shell find . -name \*.d 2> /dev/null)
|