2024-10-02 19:47:09 +03:00
|
|
|
CPPFLAGS += -Idependencies -Idependencies/mongoose
|
|
|
|
LDLIBS += -lm
|
|
|
|
|
2024-10-03 18:57:44 +03:00
|
|
|
all: img2cpi cpi2png wsvpn
|
|
|
|
|
2024-10-03 20:28:49 +03:00
|
|
|
test-cpi2png: cpi2png
|
|
|
|
./cpi2png ./cpi-images/rat.cpi /tmp/rat.png
|
|
|
|
|
2024-10-03 19:25:34 +03:00
|
|
|
img2cpi: img2cpi.c cc-common.o dependencies/stb/stb_image.o dependencies/stb/stb_image_resize2.o
|
2024-10-04 00:14:47 +03:00
|
|
|
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o "$@" $(CPPFLAGS) $(CFLAGS) $(INCPATH)
|
2024-10-03 20:28:49 +03:00
|
|
|
|
|
|
|
cpi2png: cpi2png.c cc-common.o dependencies/stb/stb_image_write.o
|
2024-10-04 00:14:47 +03:00
|
|
|
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o "$@" $(CPPFLAGS) $(CFLAGS) $(INCPATH)
|
2024-10-02 19:47:09 +03:00
|
|
|
|
2024-10-03 19:25:34 +03:00
|
|
|
dependencies/stb/%.o: dependencies/stb/%.h
|
2024-10-04 00:14:47 +03:00
|
|
|
$(CC) -DSTB_IMAGE_IMPLEMENTATION -DSTB_IMAGE_RESIZE_IMPLEMENTATION -DSTB_IMAGE_WRITE_IMPLEMENTATION -x c $^ -c -o "$@" $(CFLAGS)
|
2024-10-03 19:25:34 +03:00
|
|
|
|
2024-10-02 19:47:09 +03:00
|
|
|
wsvpn: wsvpn.o dependencies/mongoose/mongoose.o
|
2024-10-02 22:22:19 +03:00
|
|
|
$(CC) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o "$@"
|
2024-10-02 19:47:09 +03:00
|
|
|
|
|
|
|
.PHONY: all
|