forked from hkc/cc-stuff
Build stb_* stuff into a separate blob
Speeds up build process a little bit because we don't have to build it every single time
This commit is contained in:
parent
3cadd81a6b
commit
8589b2a730
5
Makefile
5
Makefile
|
@ -3,9 +3,12 @@ LDLIBS += -lm
|
||||||
|
|
||||||
all: img2cpi cpi2png wsvpn
|
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 "$@"
|
$(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
|
wsvpn: wsvpn.o dependencies/mongoose/mongoose.o
|
||||||
$(CC) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o "$@"
|
$(CC) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o "$@"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// x-run: make img2cpi CC=clang
|
// x-run: make img2cpi CC=clang
|
||||||
// x-run: ~/scripts/runc.sh % -Wall -Wextra -lm --- ~/images/boykisser.png cpi-images/boykisser.cpi
|
// x-run: ~/scripts/runc.sh % -Wall -Wextra -lm --- ~/images/boykisser.png cpi-images/boykisser.cpi
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#include <math.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <stb/stb_image.h>
|
#include <stb/stb_image.h>
|
||||||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
|
||||||
#include <stb/stb_image_resize2.h>
|
#include <stb/stb_image_resize2.h>
|
||||||
#include <argp.h>
|
#include <argp.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
Loading…
Reference in New Issue