mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Added release build targets, because bored
This commit is contained in:
15
makefile
15
makefile
@@ -5,18 +5,33 @@ export TOY_OUTDIR = out
|
|||||||
|
|
||||||
all: $(TOY_OUTDIR) repl
|
all: $(TOY_OUTDIR) repl
|
||||||
|
|
||||||
|
#repl builds
|
||||||
repl: $(TOY_OUTDIR) library
|
repl: $(TOY_OUTDIR) library
|
||||||
$(MAKE) -C repl
|
$(MAKE) -C repl
|
||||||
|
|
||||||
repl-static: $(TOY_OUTDIR) static
|
repl-static: $(TOY_OUTDIR) static
|
||||||
$(MAKE) -C repl
|
$(MAKE) -C repl
|
||||||
|
|
||||||
|
repl-release: clean $(TOY_OUTDIR) library-release
|
||||||
|
$(MAKE) -C repl release
|
||||||
|
|
||||||
|
repl-static-release: clean $(TOY_OUTDIR) static-release
|
||||||
|
$(MAKE) -C repl release
|
||||||
|
|
||||||
|
#lib builds
|
||||||
library: $(TOY_OUTDIR)
|
library: $(TOY_OUTDIR)
|
||||||
$(MAKE) -j8 -C source library
|
$(MAKE) -j8 -C source library
|
||||||
|
|
||||||
static: $(TOY_OUTDIR)
|
static: $(TOY_OUTDIR)
|
||||||
$(MAKE) -j8 -C source static
|
$(MAKE) -j8 -C source static
|
||||||
|
|
||||||
|
library-release: $(TOY_OUTDIR)
|
||||||
|
$(MAKE) -j8 -C source library-release
|
||||||
|
|
||||||
|
static-release: $(TOY_OUTDIR)
|
||||||
|
$(MAKE) -j8 -C source static-release
|
||||||
|
|
||||||
|
#utils
|
||||||
test: clean $(TOY_OUTDIR)
|
test: clean $(TOY_OUTDIR)
|
||||||
$(MAKE) -C test
|
$(MAKE) -C test
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ else
|
|||||||
$(CC) -DTOY_IMPORT $(CFLAGS) -o $(OUT) $(OBJ) -Wl,-rpath,. -L$(realpath $(shell pwd)/../$(TOY_OUTDIR)) $(LIBS)
|
$(CC) -DTOY_IMPORT $(CFLAGS) -o $(OUT) $(OBJ) -Wl,-rpath,. -L$(realpath $(shell pwd)/../$(TOY_OUTDIR)) $(LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
release: all
|
||||||
|
strip $(OUT)
|
||||||
|
|
||||||
$(OBJ): | $(ODIR)
|
$(OBJ): | $(ODIR)
|
||||||
|
|
||||||
$(ODIR):
|
$(ODIR):
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ library: $(OBJ)
|
|||||||
static: $(OBJ)
|
static: $(OBJ)
|
||||||
ar crs ../$(TOY_OUTDIR)/lib$(OUTNAME).a $(OBJ)
|
ar crs ../$(TOY_OUTDIR)/lib$(OUTNAME).a $(OBJ)
|
||||||
|
|
||||||
|
library-release: $(OBJ) library
|
||||||
|
strip $(OUT)
|
||||||
|
|
||||||
|
static-release: $(OBJ) static
|
||||||
|
strip -d ../$(TOY_OUTDIR)/lib$(OUTNAME).a
|
||||||
|
|
||||||
$(OBJ): | $(ODIR)
|
$(OBJ): | $(ODIR)
|
||||||
|
|
||||||
$(ODIR):
|
$(ODIR):
|
||||||
|
|||||||
Reference in New Issue
Block a user