You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
435B

  1. TARGET = twiboot
  2. TARGET2 = mpmboot
  3. CFLAGS = -Wall -Wno-unused-result -O2 -MMD -MP -MF $(*F).d
  4. # ------
  5. SRC := $(wildcard *.c)
  6. all: $(TARGET)
  7. $(TARGET): $(SRC:.c=.o)
  8. @echo " Linking file: $@"
  9. @$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) > /dev/null
  10. @ln -sf $@ $(TARGET2)
  11. %.o: %.c
  12. @echo " Building file: $<"
  13. @$(CC) -c $(CFLAGS) $< -o $@
  14. clean:
  15. rm -rf $(TARGET) $(TARGET2) *.o *.d
  16. -include $(shell find . -name \*.d 2> /dev/null)