diff --git a/.github/workflows/build_nsfplay3.yml b/.github/workflows/build_nsfplay3.yml index b5825e9..30c715c 100644 --- a/.github/workflows/build_nsfplay3.yml +++ b/.github/workflows/build_nsfplay3.yml @@ -10,14 +10,16 @@ concurrency: cancel-in-progress: true jobs: - check-gen: - name: Check Generated Files + code-tests: + name: Code Tests runs-on: ubuntu-latest steps: - name: Checkout Files uses: actions/checkout@v4 - - name: Verify Enums + - name: Verify Generated Enums run: make enums_verify + - name: Build Minimal Core + run: make core_minimal build-msvc: name: Windows MSVC diff --git a/core/makefile b/core/makefile index 2ea7b19..977fccd 100644 --- a/core/makefile +++ b/core/makefile @@ -13,6 +13,13 @@ OBJS = $(addprefix $(CORE_INTDIR)/,$(SRCS:.cpp=.o)) DEPS = $(addprefix $(CORE_INTDIR)/,$(SRCS:.cpp=.d)) CXXFLAGS_ALL = $(CXXFLAGS) $(CXXFLAGS_EXTRA) $(INC_COMMON) +# minimal build test to make sure the core still compiles with as much defined out as possible + +MINIMAL ?= 0 +ifeq ($(MINIMAL),1) + CXXFLAGS_ALL += -DNSF_NOTEXT +endif + # precompiled header PCH_H = core.h diff --git a/makefile b/makefile index cfe3aba..767d534 100644 --- a/makefile +++ b/makefile @@ -1,12 +1,15 @@ include makefile.common -.PHONY: default core cmd gui nsfplay mac winamp icons enums enums_verify wxlib install uninstall clean +.PHONY: default core core_minimal cmd gui nsfplay mac winamp icons enums enums_verify wxlib install uninstall clean default: core cmd nsfplay core: $(MAKE) -C core +core_minimal: + $(MAKE) -C core MINIMAL=1 + cmd: core $(MAKE) -C cmd diff --git a/readme.md b/readme.md index c0ebffc..3a7e162 100644 --- a/readme.md +++ b/readme.md @@ -80,6 +80,7 @@ On Windows (including MSYS2), you don't need to keep the cmake generated directo * `make` - builds `cmd`, `gui` * `make clean` - deletes `intermediate/` and `output/` directories. * `make core` - build core library `nsfcore` to `output/make/`. +* `make core_minimal` - build core with all optional features defined out. * `make cmd` - build `nsfplac` to `output/make/`. * `make gui` - build gui library `nsfgui` to `output/make/`. * `make nsfplay` - build `nsfplay` to `output/make/`.