makefile doesn't rebuild everything on one script change
This commit is contained in:
parent
59ad64bbba
commit
1195e6c73d
19
Makefile
19
Makefile
|
@ -1,4 +1,4 @@
|
||||||
MAKEFLAGS = --jobs=4
|
MAKEFLAGS = --jobs=8
|
||||||
UNAME != uname
|
UNAME != uname
|
||||||
MAKEDIR != pwd
|
MAKEDIR != pwd
|
||||||
# Options
|
# Options
|
||||||
|
@ -184,6 +184,8 @@ all: $(NAME)
|
||||||
SHADERS = $(shell ls source/shaders/*.sglsl)
|
SHADERS = $(shell ls source/shaders/*.sglsl)
|
||||||
SHADERS := $(patsubst %.sglsl, %.sglsl.h, $(SHADERS))
|
SHADERS := $(patsubst %.sglsl, %.sglsl.h, $(SHADERS))
|
||||||
|
|
||||||
|
prereqs: $(SHADERS) source/engine/core.cdb.h
|
||||||
|
|
||||||
DESTDIR ?= ~/.bin
|
DESTDIR ?= ~/.bin
|
||||||
install: $(NAME)
|
install: $(NAME)
|
||||||
@echo Copying to destination
|
@echo Copying to destination
|
||||||
|
@ -191,20 +193,20 @@ install: $(NAME)
|
||||||
|
|
||||||
$(NAME): $(OBJS) $(DEPS)
|
$(NAME): $(OBJS) $(DEPS)
|
||||||
@echo Linking $(NAME)
|
@echo Linking $(NAME)
|
||||||
$(CROSSWIN)$(LD) $^ $(CPPFLAGS) $(LDFLAGS) -L. $(LDPATHS) $(LDLIBS) -o $@
|
$(LD) $^ $(CPPFLAGS) $(LDFLAGS) -L. $(LDPATHS) $(LDLIBS) -o $@
|
||||||
@echo Finished build
|
@echo Finished build
|
||||||
|
|
||||||
%$(INFO).o: %.c source/engine/core.cdb.h $(SHADERS)
|
%$(INFO).o: %.c
|
||||||
@echo Making C object $@
|
@echo Making C object $@
|
||||||
$(CROSSWIN)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%$(INFO).o: %.cpp
|
%$(INFO).o: %.cpp
|
||||||
@echo Making C++ object $@
|
@echo Making C++ object $@
|
||||||
$(CROSSWIN)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fpermissive -c $< -o $@
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fpermissive -c $< -o $@
|
||||||
|
|
||||||
%$(INFO).o: %.m
|
%$(INFO).o: %.m
|
||||||
@echo Making Objective-C object $@
|
@echo Making Objective-C object $@
|
||||||
$(CROSSWIN)$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
shaders: $(SHADERS)
|
shaders: $(SHADERS)
|
||||||
@echo Making shaders
|
@echo Making shaders
|
||||||
|
@ -238,11 +240,8 @@ icon.ico: $(ICON)
|
||||||
rm $(ICNNAME)
|
rm $(ICNNAME)
|
||||||
|
|
||||||
resource.o: resource.rc resource.manifest icon.ico
|
resource.o: resource.rc resource.manifest icon.ico
|
||||||
$(CROSSWIN)windres -i $< -o $@
|
windres -i $< -o $@
|
||||||
|
|
||||||
crosswin: packer resource.o
|
|
||||||
make CROSSWIN=x86_64-w64-mingw32- CC=$(CROSSWIN)gcc OS=Windows_NT ARCH=x86_64 DEBUG=$(DEBUG) OPT=$(OPT)
|
|
||||||
|
|
||||||
crossios:
|
crossios:
|
||||||
make OS=IOS ARCH=arm64 DEBUG=$(DEBUG) OPT=$(OPT)
|
make OS=IOS ARCH=arm64 DEBUG=$(DEBUG) OPT=$(OPT)
|
||||||
|
|
||||||
|
|
|
@ -244,8 +244,7 @@ var SpriteAnim = {
|
||||||
else
|
else
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
||||||
animcache[path] = anim;
|
animcache[path] = anim;
|
||||||
console.spam(`Created animation like this:\n${json.encode(animcache[path])}`);
|
|
||||||
return animcache[path];
|
return animcache[path];
|
||||||
},
|
},
|
||||||
gif(path) {
|
gif(path) {
|
||||||
|
|
|
@ -208,7 +208,7 @@ var gameobject = {
|
||||||
},
|
},
|
||||||
|
|
||||||
tween(prop, values, def) {
|
tween(prop, values, def) {
|
||||||
var t = Tween.make(this, prop, values, def);
|
var t = Tween.make(this, prop, values, def);
|
||||||
t.play();
|
t.play();
|
||||||
|
|
||||||
var k = function() { t.pause(); }
|
var k = function() { t.pause(); }
|
||||||
|
@ -217,7 +217,6 @@ var gameobject = {
|
||||||
},
|
},
|
||||||
|
|
||||||
cry(file) {
|
cry(file) {
|
||||||
return;
|
|
||||||
this.crying = audio.play(file, audio.bus.sfx);
|
this.crying = audio.play(file, audio.bus.sfx);
|
||||||
var killfn = () => { this.crying = undefined;
|
var killfn = () => { this.crying = undefined;
|
||||||
console.warn("killed"); }
|
console.warn("killed"); }
|
||||||
|
@ -227,7 +226,7 @@ var gameobject = {
|
||||||
|
|
||||||
gscale() { return this.scale; },
|
gscale() { return this.scale; },
|
||||||
sgscale(x) {
|
sgscale(x) {
|
||||||
if (typeof x === 'number')
|
if (typeof x === 'number')
|
||||||
x = [x, x];
|
x = [x, x];
|
||||||
|
|
||||||
physics.sgscale(this, x)
|
physics.sgscale(this, x)
|
||||||
|
|
Loading…
Reference in a new issue