Fix examples compilation
This commit is contained in:
13
Makefile
13
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 $@ $<
|
||||
|
||||
|
||||
Reference in New Issue
Block a user