Skip to content

Commit fac7677

Browse files
committed
fix(Makefile): correct order of arguments in linking and test target compilation
1 parent 1f4a363 commit fac7677

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ all: $(TARGET)
7878

7979
# Link the final target
8080
$(TARGET): $(OBJ_FILES) $(DEF_FILE)
81-
$(CC) $(LDFLAGS) -o $@ $^
81+
$(CC) -o $@ $^ $(LDFLAGS)
8282
ifeq ($(PLATFORM),windows)
8383
# Generate import library for Windows
8484
dlltool -D $@ -d $(DEF_FILE) -l $(DIST_DIR)/js.lib
@@ -131,7 +131,7 @@ endif
131131

132132
# Compile test target
133133
$(TEST_TARGET): $(TEST_FILES) $(TARGET)
134-
$(CC) $(INCLUDES) $^ -lm -o $@ libs/sqlite3.c -DSQLITE_CORE
134+
$(CC) $(INCLUDES) $^ -o $@ libs/sqlite3.c -DSQLITE_CORE
135135

136136
# Testing the extension
137137
test: $(TARGET) $(TEST_TARGET)

0 commit comments

Comments
 (0)