sunxi-tools/Makefile

31 lines
481 B
Makefile
Raw Normal View History

2012-05-02 09:35:52 +02:00
CC = gcc
CFLAGS = -g -O2 -Wall -Wextra
CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200112L
2012-05-02 09:35:52 +02:00
2012-05-10 09:55:10 +02:00
TOOLS = fexc bin2fex fex2bin
2012-05-02 09:35:52 +02:00
.PHONY: all clean
all: $(TOOLS)
clean:
@rm -vf $(TOOLS)
2012-05-10 09:33:41 +02:00
$(TOOLS): Makefile common.h
fex2bin bin2fex: fexc
ln -s $< $@
2012-05-11 10:34:33 +02:00
fexc: script.h script.c \
script_bin.h script_bin.c \
script_fex.h script_fex.c
2012-05-11 09:22:47 +02:00
%: %.c %.h
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
2012-05-02 09:35:52 +02:00
.gitignore: Makefile
@for x in $(TOOLS) '*.o' '*.swp'; do \
echo $$x; \
done > $@