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:
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user