From e9bd748dd8185ddf61445f31e831d18fcdda7e07 Mon Sep 17 00:00:00 2001 From: PedroEdiaz Date: Thu, 5 Dec 2024 19:19:19 -0600 Subject: [PATCH] Fix examples compilation --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5966624..f44fbc0 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,10 @@ OBJ = \ src/main.o EXAMPLES = \ - example/basic.o + example/basic \ + example/riemman \ + example/n-cube \ + example/lens CFLAGS = \ -I./ext/cglm/include \ @@ -39,6 +42,8 @@ help: @echo " $(MAKE) linux-wayland" @echo " $(MAKE) cocoa" @echo " $(MAKE) CC=emcc wasm" + @echo "Examples" + @echo " $(MAKE) examples" @echo "Clean" @echo " $(MAKE) clean" @@ -72,7 +77,7 @@ libglfw.so: $(CC) -fPIC -shared $(DFLAGS) -D_GLFW_BUILD_DLL -Iext/glfw/deps/wayland ./ext/glfw/src/*.c -o $@ clean: - rm $(OBJ) $(BIN) + rm $(OBJ) $(BIN) $(EXAMPLES) cd ext; $(MAKE) -f glfw.mk clean; cd - @@ -82,3 +87,7 @@ examples: $(EXAMPLES) .c.o: $(CC) -Wno-implicit-function-declaration $(CFLAGS) -c -o $@ $< + +.c: + $(CC) -lm -Wno-implicit-function-declaration $(CFLAGS) -c -o $@ $< +