Adds the ability to build from the top-level directory.

This commit is contained in:
John Schneiderman 2024-08-11 09:59:53 +02:00
parent f9b7dd8418
commit b1c68d04dd
2 changed files with 6 additions and 8 deletions

View File

@ -82,22 +82,19 @@ A windows installer is provided with the release, the compiler is installed into
### Building ### Building
The compiler can also be built using MSVC or GCC. A visual studio project and a makefile are part of the source repository. The makefile is in the make folder. The compiler can also be built using MSVC or GCC. A visual studio project and a makefile are part of the source repository. The makefile is in the make folder.
You should build from a subdirectory of Oscar64 so that references in the makefile work out correctly. You should build from the top-level directory of Oscar64:
* mkdir build
* cd build
To build just the compiler: To build just the compiler:
* make -f ../make/makefile compiler * make -f make/makefile compiler
To build just game demonstrations: To build just game demonstrations:
* make -f ../make/makefile samples * make -f make/makefile samples
To build everything: To build everything:
* make -f ../make/makefile all * make -f make/makefile all
### Compiler arguments ### Compiler arguments

View File

@ -57,7 +57,8 @@ all: --prep-build-dir compiler samples tests
compiler: $(objects) compiler: $(objects)
@echo "Linking compiler..." @echo "Linking compiler..."
@$(CXX) $(CPPFLAGS) $(objects) $(linklibs) -o $(project_dir)/bin/oscar64 @cd $(srcdir); \
$(CXX) $(CPPFLAGS) $(objects) $(linklibs) -o $(project_dir)/bin/oscar64
.PHONY : clean .PHONY : clean