colorchord/embedded8266/web/Makefile

28 lines
576 B
Makefile
Raw Normal View History

2016-08-03 16:27:10 +02:00
IP ?= 192.168.4.1
2015-07-29 07:54:49 +02:00
2016-08-03 16:27:10 +02:00
.PHONY : all clean push
CFLAGS = -std=gnu99 -Wall -Wextra -O2 -march=native
all : execute_reflash page.mpfs push
2015-07-29 07:54:49 +02:00
mfsmaker : mfsmaker.c
2016-08-03 16:27:10 +02:00
$(CC) $(CFLAGS) -o $@ $^
2015-07-29 07:54:49 +02:00
page.mpfs : mfsmaker page
# cat to_compress/*.js | gzip -9 > page/compressed.js.gz
./mfsmaker page page.mpfs
2015-07-29 07:54:49 +02:00
pushtodev : pushtodev.c
2016-08-03 16:27:10 +02:00
$(CC) $(CFLAGS) -o $@ $^
2015-07-29 07:54:49 +02:00
execute_reflash : execute_reflash.c md5.c
2016-08-03 16:27:10 +02:00
$(CC) $(CFLAGS) -o $@ $^
2015-07-29 07:54:49 +02:00
push : pushtodev page.mpfs
./pushtodev $(IP) 65536 page.mpfs
# ./pushtodev $(IP) 1048576 page.mpfs
2015-07-29 07:54:49 +02:00
clean :
2016-08-03 16:27:10 +02:00
$(RM) mfsmaker page.mpfs pushtodev execute_reflash