reorder makefile

This commit is contained in:
2025-01-13 00:20:43 +01:00
parent e165ac57a2
commit bc92e462ee

View File

@@ -12,11 +12,6 @@ SRC = $(wildcard src/*.c) $(wildcard src/**/*.c) $(wildcard src/**/**/*.c) $(wil
OBJ = $(patsubst src/%,$(DIR_OBJ)/$(ARCH)/%,$(SRC:.c=.o)) OBJ = $(patsubst src/%,$(DIR_OBJ)/$(ARCH)/%,$(SRC:.c=.o))
TARGET = $(DIR_BIN)/$(ARCH)/$(NAME)$(EXT) TARGET = $(DIR_BIN)/$(ARCH)/$(NAME)$(EXT)
all: linux-x86_64 win-x86_64 web
clean:
rm -rf $(DIR_BIN) $(DIR_OBJ)
# 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=linux-x86_64 CFLAGS="$(CFLAGS) -target x86_64-pc-linux-gnu"
@@ -25,6 +20,11 @@ win-x86_64:
web: web:
$(MAKE) build ARCH=web CC=emcc EXT=".html" $(MAKE) build ARCH=web CC=emcc EXT=".html"
all: linux-x86_64 win-x86_64 web
clean:
rm -rf $(DIR_BIN) $(DIR_OBJ)
build: dirs binary build: dirs binary
# creates the binary # creates the binary