Some minor fixes to build process

This commit is contained in:
Stephen Seo 2023-07-30 21:43:18 +09:00
parent 9c6f805697
commit c146d86af7
3 changed files with 10 additions and 6 deletions

View file

@ -12,9 +12,11 @@ OBJDIR = objdir
SOURCES = \
src/main.cc
HEADERS =
OBJECTS = $(addprefix ${OBJDIR}/,$(subst .cc,.cc.o,${SOURCES}))
all: demo_0
all: | format demo_0
demo_0: ${OBJECTS}
${CXX} -o demo_0 ${LINKER_FLAGS} $^
@ -25,7 +27,8 @@ clean:
rm -rf ${OBJDIR}
rm -f demo_0
.SECONDEXPANSION:
format:
clang-format -i --style=google ${HEADERS} ${SOURCES}
${OBJDIR}/%.cc.o: %.cc
@mkdir -p $(dir $@)

View file

@ -1,8 +1,9 @@
// emscripten includes
#ifdef __EMSCRIPTEN__
#include "ems.h"
#include <emscripten.h>
#include <emscripten/html5.h>
#include "ems.h"
#else
#include <random>
#endif
@ -22,8 +23,8 @@ EM_BOOL resize_event_callback(int event_type, const EmscriptenUiEvent *event,
//((GameRenderer *)ud)->screen_size_changed();
}
return false;
} // resize_event_callback(...)
} // extern "C"
} // resize_event_callback(...)
} // extern "C"
#endif
// Main loop frame

View file

@ -33,4 +33,4 @@ clean:
rm -f jumpartifact.com_demo_0.data
format:
clang-format -i --style=file ${SOURCES} ${HEADERS}
clang-format -i --style=google ${SOURCES} ${HEADERS}