You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
872 B
49 lines
872 B
ifndef EMSDK |
|
TARGET := shader-demo |
|
else |
|
TARGET := shader-demo.js |
|
endif |
|
SRCS := shader-demo.cpp |
|
|
|
#precompiled headers |
|
HEADERS := |
|
OBJS := ${SRCS:.cpp=.o} |
|
DEPS := ${SRCS:.cpp=.dep} |
|
|
|
CXXFLAGS += -fpic |
|
LDFLAGS += |
|
LIBS += -lm -lopencv_viz2d |
|
.PHONY: all release debug clean distclean |
|
|
|
all: release |
|
release: ${TARGET} |
|
debug: ${TARGET} |
|
info: ${TARGET} |
|
profile: ${TARGET} |
|
unsafe: ${TARGET} |
|
asan: ${TARGET} |
|
|
|
${TARGET}: ${OBJS} |
|
${CXX} ${LDFLAGS} -o $@ $^ ${LIBS} |
|
|
|
${OBJS}: %.o: %.cpp %.dep ${GCH} |
|
${CXX} ${CXXFLAGS} -o $@ -c $< |
|
|
|
${DEPS}: %.dep: %.cpp Makefile |
|
${CXX} ${CXXFLAGS} -MM $< > $@ |
|
|
|
${GCH}: %.gch: ${HEADERS} |
|
${CXX} ${CXXFLAGS} -o $@ -c ${@:.gch=.hpp} |
|
|
|
install: |
|
mkdir -p ${DESTDIR}/${PREFIX} |
|
cp ${TARGET} ${DESTDIR}/${PREFIX} |
|
|
|
uninstall: |
|
rm ${DESTDIR}/${PREFIX}/${TARGET} |
|
|
|
clean: |
|
rm -f *~ ${DEPS} ${OBJS} ${CUO} ${GCH} ${TARGET} |
|
|
|
distclean: clean |
|
|
|
|