diff --git a/examples/device-dashboard/Makefile b/examples/device-dashboard/Makefile index d59281d3..0ae50778 100644 --- a/examples/device-dashboard/Makefile +++ b/examples/device-dashboard/Makefile @@ -21,12 +21,14 @@ endif all: $(PROG) $(RUN) ./$(PROG) $(ARGS) +ifneq ($(OS),Windows_NT) # Before embedding files, gzip them to save space packed_fs.c: $(shell find web_root -type f) Makefile rm -rf tmp/web_root && mkdir tmp && cp -r web_root tmp/ find tmp -type f | xargs -n1 gzip $(CC) ../../test/pack.c -o pack cd tmp && ../pack `find web_root -type f` > ../$@ +endif $(PROG): $(SOURCES) $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) diff --git a/examples/embedded-filesystem/Makefile b/examples/embedded-filesystem/Makefile index 9f42f0c6..cce143ec 100644 --- a/examples/embedded-filesystem/Makefile +++ b/examples/embedded-filesystem/Makefile @@ -13,23 +13,25 @@ ifeq ($(OS),Windows_NT) CFLAGS += -lws2_32 # Link against Winsock library DELETE = cmd /C del /Q /F /S # Command prompt command to delete files OUT ?= -o $(PROG) # Build output + PACK = pack.exe else # Mac, Linux PROG ?= example DELETE = rm -rf OUT ?= -o $(PROG) + PACK = ./pack endif all: $(PROG) $(RUN) ./$(PROG) $(ARGS) $(PROG): $(SOURCES) $(FILES_TO_EMBED) - $(CC) ../../test/pack.c -o pack - ./pack $(FILES_TO_EMBED) > packed_fs.c + $(CC) ../../test/pack.c -o $(PACK) + $(PACK) $(FILES_TO_EMBED) > packed_fs.c $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT) clean: - $(DELETE) $(PROG) *.dSYM pack + $(DELETE) $(PROG) *.dSYM $(PACK) .PHONY: compress expand gzipped plain all