Skip to content

Commit

Permalink
chore: Adjust .a generation for net8/net9 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Oct 23, 2024
1 parent 49f5534 commit 5b5b5c2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ EXPORTED_FUNCTIONS_JSON = src/exported_functions.json

# temporary files

BITCODE_FILES = temp/a/sqlite3.a temp/a/extension-functions.a temp/a/wasmhelpers.a
BITCODE_FILES = temp/o/sqlite3.o temp/o/extension-functions.o temp/o/wasmhelpers.o

# build options
EMCC = emcc
Expand Down Expand Up @@ -96,20 +96,20 @@ deps/$(EXTENSION_FUNCTIONS): cache/$(EXTENSION_FUNCTIONS)
clean-temp:
rm -rf temp

temp/a/shell.a: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h
mkdir -p temp/a
temp/o/shell.o: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h
mkdir -p temp/o
$(EMCC) $(CFLAGS) 'deps/$(SQLITE_AMALGAMATION)/shell.c' -r -o $@

temp/a/sqlite3.a: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h
mkdir -p temp/a
temp/o/sqlite3.o: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h
mkdir -p temp/o
$(EMCC) $(CFLAGS) -s LINKABLE=1 'deps/$(SQLITE_AMALGAMATION)/sqlite3.c' -r -o $@

temp/a/extension-functions.a: deps/$(EXTENSION_FUNCTIONS) src/c/sqlite_cfg.h
mkdir -p temp/a
temp/o/extension-functions.o: deps/$(EXTENSION_FUNCTIONS) src/c/sqlite_cfg.h
mkdir -p temp/o
$(EMCC) $(CFLAGS) -s LINKABLE=1 'deps/$(EXTENSION_FUNCTIONS)' -r -o $@

temp/a/wasmhelpers.a: src/c/wasmhelpers.c src/c/sqlite_cfg.h
mkdir -p temp/a
temp/o/wasmhelpers.o: src/c/wasmhelpers.c src/c/sqlite_cfg.h
mkdir -p temp/o
$(EMCC) $(CFLAGS) -s LINKABLE=1 src/c/wasmhelpers.c -r -o $@

## debug
Expand All @@ -118,9 +118,9 @@ clean-debug:
rm -rf debug

.PHONY: debug
debug: debug/sqlite3.a
debug: debug/sqlite3.o

debug/sqlite3.a: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON)
debug/sqlite3.o: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON)
mkdir -p debug
$(EMCC) $(EMFLAGS) $(EMFLAGS_DEBUG) $(BITCODE_FILES) -r -o $@

Expand All @@ -130,7 +130,7 @@ clean-dist:
rm -rf dist

.PHONY: dist
dist: dist/sqlite3.a
dist: dist/sqlite3.o

# The name of this binary is aligned with the SQLitePCLRaw.bundle_sqlite3
# imports, which uses "sqlite3".
Expand Down

0 comments on commit 5b5b5c2

Please sign in to comment.