From 1b8008c41a04ceeb3ac4970f469ce9420ec29241 Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 15 Dec 2024 22:48:12 +1100 Subject: Windowing + keyboard and mouse input --- Makefile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e506470..b9f2151 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,18 @@ .POSIX: +target = c2 data_dir = data shaders = data/triangle.csh tools = qstd cfg sc +objects = app.o c2.o +includes = -Iqstd +defines = -Dplat_x86 -Dplat_posix -Dplat_x11 -Dallocation_default_alignment=8 +cflags = $(includes) $(defines) $(DEBUG_COMPILE_FLAG) +libs = -lX11 -lm +lflags = $(libs) $(DEBUG_LINK_FLAG) .PHONY: all clean $(tools) -all: $(shaders) $(tools) +all: $(target) $(shaders) $(tools) $(objects) qstd: $(MAKE) -C qstd @@ -19,11 +26,25 @@ sc: qstd cfg data/triangle.csh: intermediate/triangle.glsl | $(data_dir) sc ./sc/sc intermediate/triangle.glsl data/triangle.csh +app.o: app.cpp app.hpp + $(CXX) -c $(cflags) app.cpp -o app.o + +c2.o: c2.cpp app.hpp + $(CXX) -c $(cflags) c2.cpp -o c2.o + +$(target): $(objects) qstd/libqstd.a + $(CXX) $(objects) $(lflags) -o $(target) -Lqstd -lqstd + +qstd/libqstd.a: + $(MAKE) -C qstd + $(data_dir): mkdir -p $(data_dir) clean: rm -rf $(data_dir) + rm -f $(objects) + rm -f $(targets) make -C qstd clean make -C cfg clean make -C sc clean -- cgit v1.2.3-54-g00ecf