Skip to content

Commit

Permalink
Add separate demo build target, build demo and threads with build target
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarthayhurst committed Feb 10, 2024
1 parent 0f23728 commit 9483752
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-build-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: (g++) Check built objects are present
run: |
ls build/demo build/libammonite.so
ls build/demo build/threadDemo build/libammonite.so
- name: Clean build area
run: |
Expand All @@ -64,7 +64,7 @@ jobs:
- name: (clang++) Check built objects are present
run: |
ls build/demo build/libammonite.so
ls build/demo build/threadDemo build/libammonite.so
- name: Test library install target
run: |
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ $(OBJECT_DIR)/threadDemo.o: ./src/threadDemo.cpp $(AMMONITE_HEADER_SOURCE)
@mkdir -p "$(OBJECT_DIR)"
$(CXX) ./src/threadDemo.cpp -c $(CXXFLAGS) -o "$@"

.PHONY: build debug library headers install uninstall clean cache icons threads $(AMMONITE_HEADER_INSTALL)
build: $(BUILD_DIR)/demo
.PHONY: build demo threads debug library headers install uninstall clean cache icons $(AMMONITE_HEADER_INSTALL)
build: demo threads
demo: $(BUILD_DIR)/demo
@if [[ "$(DEBUG)" != "true" ]]; then \
strip --strip-unneeded "$(BUILD_DIR)/demo"; \
fi
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@

## Build system:
- ### Targets:
- `build`, `debug`, `library` and `threads` support building on multiple cores with `-jX`
- `make build` - Builds demo binary, a working demonstration of the renderer
- `build`, `debug`, `library`, `demo` and `threads` support `-j[CORE COUNT]`
- `make build` - Builds the demo and thread demo
- `make debug` - Cleans build directory, then runs `make build` in debug mode
- `make library` - Builds `build/libammonite.so`
- `make demo` - Builds a demo binary, a working demonstration of the renderer
- `make threads` - Builds a test program for the thread pool
- `make install` - Installs `libammonite.so` to system directories
- The install path can be configured, by setting the environment variable `INSTALL_DIR`
Expand Down

0 comments on commit 9483752

Please sign in to comment.