Some minor fixes to build process
This commit is contained in:
parent
9c6f805697
commit
c146d86af7
3 changed files with 10 additions and 6 deletions
7
Makefile
7
Makefile
|
@ -12,9 +12,11 @@ OBJDIR = objdir
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
src/main.cc
|
src/main.cc
|
||||||
|
|
||||||
|
HEADERS =
|
||||||
|
|
||||||
OBJECTS = $(addprefix ${OBJDIR}/,$(subst .cc,.cc.o,${SOURCES}))
|
OBJECTS = $(addprefix ${OBJDIR}/,$(subst .cc,.cc.o,${SOURCES}))
|
||||||
|
|
||||||
all: demo_0
|
all: | format demo_0
|
||||||
|
|
||||||
demo_0: ${OBJECTS}
|
demo_0: ${OBJECTS}
|
||||||
${CXX} -o demo_0 ${LINKER_FLAGS} $^
|
${CXX} -o demo_0 ${LINKER_FLAGS} $^
|
||||||
|
@ -25,7 +27,8 @@ clean:
|
||||||
rm -rf ${OBJDIR}
|
rm -rf ${OBJDIR}
|
||||||
rm -f demo_0
|
rm -f demo_0
|
||||||
|
|
||||||
.SECONDEXPANSION:
|
format:
|
||||||
|
clang-format -i --style=google ${HEADERS} ${SOURCES}
|
||||||
|
|
||||||
${OBJDIR}/%.cc.o: %.cc
|
${OBJDIR}/%.cc.o: %.cc
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
// emscripten includes
|
// emscripten includes
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
#include "ems.h"
|
|
||||||
#include <emscripten.h>
|
#include <emscripten.h>
|
||||||
#include <emscripten/html5.h>
|
#include <emscripten/html5.h>
|
||||||
|
|
||||||
|
#include "ems.h"
|
||||||
#else
|
#else
|
||||||
#include <random>
|
#include <random>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -33,4 +33,4 @@ clean:
|
||||||
rm -f jumpartifact.com_demo_0.data
|
rm -f jumpartifact.com_demo_0.data
|
||||||
|
|
||||||
format:
|
format:
|
||||||
clang-format -i --style=file ${SOURCES} ${HEADERS}
|
clang-format -i --style=google ${SOURCES} ${HEADERS}
|
||||||
|
|
Loading…
Reference in a new issue