Add flag to link musl instead of glibc
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
default: lib
|
default: lib
|
||||||
|
|
||||||
CC := cc
|
ifdef LIBSM64_MUSL
|
||||||
|
CC := musl-gcc
|
||||||
|
else
|
||||||
|
CC := cc
|
||||||
|
endif
|
||||||
CFLAGS := -g -Wall -fPIC -DSM64_LIB_EXPORT
|
CFLAGS := -g -Wall -fPIC -DSM64_LIB_EXPORT
|
||||||
LDFLAGS := -lm -shared
|
LDFLAGS := -lm -shared
|
||||||
|
|
||||||
@@ -28,7 +32,7 @@ ifeq ($(OS),Windows_NT)
|
|||||||
LIB_FILE := $(DIST_DIR)/sm64.dll
|
LIB_FILE := $(DIST_DIR)/sm64.dll
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DUMMY != mkdir -p $(ALL_DIRS) build/test src/decomp/mario $(DIST_DIR)/include
|
DUMMY != mkdir -p $(ALL_DIRS) build/test src/decomp/mario $(DIST_DIR)/include
|
||||||
|
|
||||||
|
|
||||||
$(filter-out src/decomp/mario/geo.inc.c,$(IMPORTED)): src/decomp/mario/geo.inc.c
|
$(filter-out src/decomp/mario/geo.inc.c,$(IMPORTED)): src/decomp/mario/geo.inc.c
|
||||||
@@ -69,4 +73,4 @@ run: test
|
|||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILD_DIR) $(DIST_DIR) src/decomp/mario test/level.? $(TEST_FILE)
|
rm -rf $(BUILD_DIR) $(DIST_DIR) src/decomp/mario test/level.? $(TEST_FILE)
|
||||||
|
|
||||||
-include $(DEP_FILES)
|
-include $(DEP_FILES)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ which makes use of this library must ask the user to provide a ROM for asset ext
|
|||||||
|
|
||||||
- Ensure python3 is installed.
|
- Ensure python3 is installed.
|
||||||
- Ensure the SDL2 and GLEW libraries are installed if you're building the test program (on Ubuntu: libsdl2-dev, libglew-dev)
|
- Ensure the SDL2 and GLEW libraries are installed if you're building the test program (on Ubuntu: libsdl2-dev, libglew-dev)
|
||||||
- Run `make` to build
|
- Run `make` to build. If you want to link musl libc instead of glibc run `LIBSM64_MUSL=1 make` instead.
|
||||||
- To run the test program you'll need a SM64 US ROM in the root of the repository with the name `baserom.us.z64`.
|
- To run the test program you'll need a SM64 US ROM in the root of the repository with the name `baserom.us.z64`.
|
||||||
|
|
||||||
## Building on Windows (test program not supported)
|
## Building on Windows (test program not supported)
|
||||||
|
|||||||
Reference in New Issue
Block a user