project for a (works on my devices) demo
This commit is contained in:
46
demo/Makefile
Normal file
46
demo/Makefile
Normal file
@@ -0,0 +1,46 @@
|
||||
include ../external.mk
|
||||
|
||||
TARGET=main.exe
|
||||
|
||||
OBJECTS=main.o
|
||||
|
||||
FULL_BUILD_OBJECTS=${OBJECTS}
|
||||
|
||||
|
||||
GLUT_D=${PWD}
|
||||
|
||||
LINKS=-lGLESv2 -lmyGLUT
|
||||
|
||||
# same as the GL_STUFF MAKEFILE
|
||||
CFLAGS=-ansi -Wpedantic -Winline -Werror -std=c11
|
||||
|
||||
all :
|
||||
make -C ${GLUT_D}
|
||||
make ${TARGET}
|
||||
|
||||
|
||||
# -L GLUT_D MUST GO AFTER THE L_SHLIBS, OTHERWISE ASSUMES THAT THE myGLUT DEPENDENCIES ARE SIMPLY UNMET
|
||||
# removed the space between -L and GLUT_D
|
||||
${TARGET} : ${OBJECTS}
|
||||
${COMPILER} \
|
||||
-o ${TARGET} \
|
||||
${FULL_BUILD_OBJECTS} \
|
||||
-Wl,-unresolved-symbols=ignore-in-shared-libs \
|
||||
${L_SHLIBS} \
|
||||
-L${GLUT_D} \
|
||||
${LINKS}
|
||||
|
||||
|
||||
# -I ./ è una porcata clamorosa
|
||||
main.o : main.c ${GLUT_D}glut.h ${GLUT_D}glut_extensions.h
|
||||
${COMPILER} \
|
||||
${I_MY_GLUT} \
|
||||
${I_GRAPHICS} \
|
||||
-c ${CFLAGS} main.c \
|
||||
${GLOBAL_COMPILE_CONF}
|
||||
|
||||
.PHONY: clean debug
|
||||
|
||||
clean:
|
||||
make clean -C ${GLUT_D}
|
||||
-rm ${TARGET} ${OBJECTS} *~ core
|
||||
Reference in New Issue
Block a user