diff --git a/Makefile b/Makefile index 1f891c5..592ddc1 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,12 @@ LDLIBS += -lm all: img2cpi cpi2png wsvpn -img2cpi: img2cpi.c cc-common.o +img2cpi: img2cpi.c cc-common.o dependencies/stb/stb_image.o dependencies/stb/stb_image_resize2.o $(CC) $(LDFLAGS) $^ $(LDLIBS) -o "$@" +dependencies/stb/%.o: dependencies/stb/%.h + $(CC) -DSTB_IMAGE_IMPLEMENTATION -DSTB_IMAGE_RESIZE_IMPLEMENTATION -DSTB_IMAGE_WRITE_IMPLEMENTATION -x c $^ -c -o "$@" + wsvpn: wsvpn.o dependencies/mongoose/mongoose.o $(CC) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o "$@" diff --git a/img2cpi.c b/img2cpi.c index cfe1d7c..743bc0a 100644 --- a/img2cpi.c +++ b/img2cpi.c @@ -1,8 +1,8 @@ // x-run: make img2cpi CC=clang // x-run: ~/scripts/runc.sh % -Wall -Wextra -lm --- ~/images/boykisser.png cpi-images/boykisser.cpi -#define STB_IMAGE_IMPLEMENTATION +#include +#include #include -#define STB_IMAGE_RESIZE_IMPLEMENTATION #include #include #include