Makefile 372 Bytes
Newer Older
Alejandro Mery's avatar
Alejandro Mery committed
1
CC = gcc
2
CFLAGS = -g -O2 -Wall -Wextra -std=c99
Alejandro Mery's avatar
Alejandro Mery committed
3
4
5
6
7
8
9
10
11
12

TOOLS = bin2fex fex2bin

.PHONY: all clean

all: $(TOOLS)

clean:
	@rm -vf $(TOOLS)

13
14
15

$(TOOLS): Makefile sunxi-tools.h

16
fex2bin: script.c script.h
17
bin2fex: script.h
18

19
20
%: %.c %.h
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
21

Alejandro Mery's avatar
Alejandro Mery committed
22
23
24
25
.gitignore: Makefile
	@for x in $(TOOLS) '*.o' '*.swp'; do \
		echo $$x; \
	done > $@