mirror of
https://github.com/thepigeongenerator/sdl_template.git
synced 2025-12-17 05:55:47 +01:00
include architecture in compilation, and remove unneeded recursion from compile_commands
also move profile log to build step
This commit is contained in:
12
makefile
12
makefile
@@ -37,14 +37,15 @@ endef
|
|||||||
|
|
||||||
# sets the variables for the different targets
|
# sets the variables for the different targets
|
||||||
linux-x86_64:
|
linux-x86_64:
|
||||||
@$(MAKE) _build ARCH=linux-x86_64 CFLAGS="$(CFLAGS) -target x86_64-pc-linux-gnu"
|
@$(MAKE) _build ARCH=$@ CFLAGS="$(CFLAGS) -target x86_64-pc-linux-gnu"
|
||||||
win-x86_64:
|
win-x86_64:
|
||||||
@$(MAKE) _build ARCH=win-x86-64 CFLAGS="$(CFLAGS) -target x86_64-pc-windows-gnu" EXT=".exe"
|
@$(MAKE) _build ARCH=$@ CFLAGS="$(CFLAGS) -target x86_64-pc-windows-gnu" EXT=".exe"
|
||||||
web:
|
web:
|
||||||
@$(MAKE) _build ARCH=web CC=emcc EXT=".html"
|
@$(MAKE) _build ARCH=$@ CC=emcc EXT=".html"
|
||||||
|
|
||||||
all: linux-x86_64 win-x86_64 web
|
all: linux-x86_64 win-x86_64 web
|
||||||
_build: compile_commands.json $(DIR) $(TARGET) $(ASSETS)
|
_build: compile_commands.json $(DIR) $(TARGET) $(ASSETS)
|
||||||
|
@$(call wr_colour,"current profile: '$(PROF)'",93)
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(DIR_BIN) $(DIR_OBJ) compile_commands.json
|
rm -rf $(DIR_BIN) $(DIR_OBJ) compile_commands.json
|
||||||
|
|
||||||
@@ -73,16 +74,13 @@ $(DIR):
|
|||||||
# update compile commands if the makefile has been updated (for linting)
|
# update compile commands if the makefile has been updated (for linting)
|
||||||
ifeq ($(DEBUG),1)
|
ifeq ($(DEBUG),1)
|
||||||
compile_commands.json: makefile
|
compile_commands.json: makefile
|
||||||
@$(call wr_colour,"current profile: DEBUG",93)
|
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
@touch compile_commands.json
|
@touch compile_commands.json
|
||||||
bear -- make
|
bear -- make $(ARCH)
|
||||||
else
|
else
|
||||||
compile_commands.json: makefile
|
compile_commands.json: makefile
|
||||||
@$(call wr_colour,"current profile: RELEASE",93)
|
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
@touch compile_commands.json
|
@touch compile_commands.json
|
||||||
$(MAKE)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# include the dependencies
|
# include the dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user