diff --git a/Box b/Box index c330ba9..888b7e2 160000 --- a/Box +++ b/Box @@ -1 +1 @@ -Subproject commit c330ba9831ba41112b143b8c927c98e5d7acff10 +Subproject commit 888b7e27baae8a54effb4ea4a97ef39a8441da40 diff --git a/makefile b/makefile index 907da5b..486e268 100644 --- a/makefile +++ b/makefile @@ -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) diff --git a/source/makefile b/source/makefile index 6d8b9fe..04012fb 100644 --- a/source/makefile +++ b/source/makefile @@ -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):