fix(build): resolve BSD make compatibility issues

- Use absolute path ${.CURDIR}/test in main bmake.mk
- Replace automatic variable $< with explicit source filenames in test/bmake.mk
- Ensure proper directory navigation and source file compilation
- Fixes "undefined symbol: main" linker error on BSD systems
This commit is contained in:
2026-01-31 23:08:39 +01:00
parent d2bf8fb67a
commit d7f6adb5b5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -50,4 +50,4 @@ clean:
test: debug test: debug
@echo "=== Building and running stk tests ===" @echo "=== Building and running stk tests ==="
cd test && ${MAKE} -f bmake.mk cd ${.CURDIR}/test && ${MAKE} -f bmake.mk
+2 -2
View File
@@ -17,10 +17,10 @@ MODULE_EXT = .so
all: test all: test
test_program: test.c test_program: test.c
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(CC) $(CFLAGS) -o $@ test.c $(LDFLAGS)
test_mod$(MODULE_EXT): test_mod.c test_mod$(MODULE_EXT): test_mod.c
$(CC) $(CFLAGS) -fPIC -shared -o $@ $< $(CC) $(CFLAGS) -fPIC -shared -o $@ test_mod.c
setup: setup:
@mkdir -p mods @mkdir -p mods