Clean up Makefiles

This commit is contained in:
con-f-use 2016-08-03 16:27:10 +02:00
parent 0a7dfbd381
commit 6f1ab3059a
2 changed files with 72 additions and 70 deletions

View file

@ -1,23 +1,27 @@
all : execute_reflash page.mpfs push
IP ?= 192.168.4.1
IP?=192.168.4.1
.PHONY : all clean push
CFLAGS = -std=gnu99 -Wall -Wextra -O2 -march=native
all : execute_reflash page.mpfs push
mfsmaker : mfsmaker.c
gcc -o $@ $^
$(CC) $(CFLAGS) -o $@ $^
page.mpfs : mfsmaker page
# cat to_compress/*.js | gzip -9 > page/compressed.js.gz
./mfsmaker page page.mpfs
pushtodev : pushtodev.c
gcc -o $@ $^
$(CC) $(CFLAGS) -o $@ $^
execute_reflash : execute_reflash.c md5.c
gcc -o $@ $^
$(CC) $(CFLAGS) -o $@ $^
push : pushtodev page.mpfs
./pushtodev $(IP) 65536 page.mpfs
# ./pushtodev $(IP) 1048576 page.mpfs
clean :
rm -rf mfsmaker page.mpfs pushtodev execute_reflash
$(RM) mfsmaker page.mpfs pushtodev execute_reflash