Skip to content

Commit

Permalink
Merge pull request #162 from joeyates/feature/rebuild-on-js-changes
Browse files Browse the repository at this point in the history
Rebuild on changes to Javascript libraries
  • Loading branch information
rhashimoto authored Mar 25, 2024
2 parents f1f8550 + f847e6a commit cb44d0d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ CFILES = \
libvfs.c \
$(CFILES_EXTRA)

JSFILES = \
src/libauthorizer.js \
src/libfunction.js \
src/libmodule.js \
src/libprogress.js \
src/libvfs.js

vpath %.c src
vpath %.c deps
vpath %.c deps/$(SQLITE_VERSION)
Expand Down Expand Up @@ -159,14 +166,14 @@ clean-debug:
.PHONY: debug
debug: debug/wa-sqlite.mjs debug/wa-sqlite-async.mjs

debug/wa-sqlite.mjs: $(OBJ_FILES_DEBUG) $(EXPORTED_FUNCTIONS) $(EXPORTED_RUNTIME_METHODS)
debug/wa-sqlite.mjs: $(OBJ_FILES_DEBUG) $(JSFILES) $(EXPORTED_FUNCTIONS) $(EXPORTED_RUNTIME_METHODS)
mkdir -p debug
$(EMCC) $(EMFLAGS_DEBUG) \
$(EMFLAGS_INTERFACES) \
$(EMFLAGS_LIBRARIES) \
$(OBJ_FILES_DEBUG) -o $@

debug/wa-sqlite-async.mjs: $(OBJ_FILES_DEBUG) $(EXPORTED_FUNCTIONS) $(EXPORTED_RUNTIME_METHODS) $(ASYNCIFY_IMPORTS)
debug/wa-sqlite-async.mjs: $(OBJ_FILES_DEBUG) $(JSFILES) $(EXPORTED_FUNCTIONS) $(EXPORTED_RUNTIME_METHODS) $(ASYNCIFY_IMPORTS)
mkdir -p debug
$(EMCC) $(EMFLAGS_DEBUG) \
$(EMFLAGS_INTERFACES) \
Expand All @@ -182,14 +189,14 @@ clean-dist:
.PHONY: dist
dist: dist/wa-sqlite.mjs dist/wa-sqlite-async.mjs

dist/wa-sqlite.mjs: $(OBJ_FILES_DIST) $(EXPORTED_FUNCTIONS) $(EXPORTED_RUNTIME_METHODS)
dist/wa-sqlite.mjs: $(OBJ_FILES_DIST) $(JSFILES) $(EXPORTED_FUNCTIONS) $(EXPORTED_RUNTIME_METHODS)
mkdir -p dist
$(EMCC) $(EMFLAGS_DIST) \
$(EMFLAGS_INTERFACES) \
$(EMFLAGS_LIBRARIES) \
$(OBJ_FILES_DIST) -o $@

dist/wa-sqlite-async.mjs: $(OBJ_FILES_DIST) $(EXPORTED_FUNCTIONS) $(EXPORTED_RUNTIME_METHODS) $(ASYNCIFY_IMPORTS)
dist/wa-sqlite-async.mjs: $(OBJ_FILES_DIST) $(JSFILES) $(EXPORTED_FUNCTIONS) $(EXPORTED_RUNTIME_METHODS) $(ASYNCIFY_IMPORTS)
mkdir -p dist
$(EMCC) $(EMFLAGS_DIST) \
$(EMFLAGS_INTERFACES) \
Expand Down

0 comments on commit cb44d0d

Please sign in to comment.