diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bb8a82..a477230 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,6 @@ name: release sqlite-js on: push: - branches: - - main permissions: contents: write @@ -121,6 +119,7 @@ jobs: runs-on: ubuntu-latest name: release needs: build + if: github.ref == 'refs/heads/main' env: GH_TOKEN: ${{ github.token }} diff --git a/Makefile b/Makefile index 0f85c20..018a298 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ else ifeq ($(PLATFORM),isim) CFLAGS += -arch x86_64 -arch arm64 $(SDK) else # linux TARGET := $(DIST_DIR)/js.so - LDFLAGS := -shared + LDFLAGS := -lm -shared endif # Object files @@ -78,7 +78,7 @@ all: $(TARGET) # Link the final target $(TARGET): $(OBJ_FILES) $(DEF_FILE) - $(CC) $(LDFLAGS) -o $@ $^ + $(CC) -o $@ $^ $(LDFLAGS) ifeq ($(PLATFORM),windows) # Generate import library for Windows dlltool -D $@ -d $(DEF_FILE) -l $(DIST_DIR)/js.lib @@ -131,7 +131,7 @@ endif # Compile test target $(TEST_TARGET): $(TEST_FILES) $(TARGET) - $(CC) $(INCLUDES) $^ -lm -o $@ libs/sqlite3.c -DSQLITE_CORE + $(CC) $(INCLUDES) $^ -o $@ libs/sqlite3.c -DSQLITE_CORE # Testing the extension test: $(TARGET) $(TEST_TARGET)