add linux tool

This commit is contained in:
Olaf Rempel
2010-10-16 19:29:15 +02:00
parent 8a98e09c46
commit 6244c44e65
7 changed files with 1403 additions and 0 deletions

22
linux/Makefile Normal file
View File

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