Tweaked makefile

This commit is contained in:
2023-06-29 09:46:48 +10:00
parent 0671a89d43
commit 51a0c94ba2
3 changed files with 31 additions and 7 deletions

2
Box

Submodule Box updated: c330ba9831...888b7e27ba

View File

@@ -1,16 +1,35 @@
export CFLAGS+=-std=c18 -pedantic -Werror
export OUTDIR = out
export BOX_OUTDIR = ../$(OUTDIR)
export TOY_OUTDIR = ../../$(OUTDIR)
all: $(OUTDIR) toy box
all: toy box game
toy: $(OUTDIR)
$(MAKE) -j8 -C Box/Toy/source
box: $(OUTDIR)
$(MAKE) -j8 -C Box/source
game: $(OUTDIR)
$(MAKE) -j8 -C source
cp -r assets $(OUTDIR)
toy: $(LIBDIR)
$(MAKE) -j8 -C Box/Toy/source
#release
toy-release: $(OUTDIR)
$(MAKE) -j8 -C Box/Toy/source library-release
box: $(LIBDIR)
$(MAKE) -j8 -C Box/source
box-release: $(OUTDIR)
$(MAKE) -j8 -C Box/source library-release
game-release: $(OUTDIR)
$(MAKE) -j8 -C source game-release
cp -r assets $(OUTDIR)
#distribution
dist: export CFLAGS+=-O2 -mtune=native -march=native
dist: toy-release box-release game-release
$(OUTDIR):
mkdir $(OUTDIR)

View File

@@ -10,9 +10,14 @@ OBJ = $(addprefix $(ODIR)/,$(SRC:.c=.o))
OUT=../$(OUTDIR)/airport
all: $(OBJ)
all: game
game: $(OBJ)
$(CC) $(CFLAGS) -o $(OUT) $(OBJ) -Wl,-rpath,. -L../$(OUTDIR) $(LIBS)
game-release: game
strip $(OUT)
$(OBJ): | $(ODIR)
$(ODIR):