This repository has been archived on 2021-01-07. You can view files and clone it, but cannot push or open issues or pull requests.
twiboot/linux/Makefile
2012-02-11 12:44:02 +01:00

25 lines
435 B
Makefile

TARGET = twiboot
TARGET2 = mpmboot
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
@ln -sf $@ $(TARGET2)
%.o: %.c
@echo " Building file: $<"
@$(CC) -c $(CFLAGS) $< -o $@
clean:
rm -rf $(TARGET) $(TARGET2) *.o *.d
-include $(shell find . -name \*.d 2> /dev/null)