Merge pull request #78 from jadziamd/main

Adds the ability to build from the top-level directory.
This commit is contained in:
drmortalwombat 2024-08-11 10:18:23 +02:00 committed by GitHub
commit be5626adc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
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.
* mkdir build
* cd build
You should build from the top-level directory of Oscar64:
To build just the compiler:
* make -f ../make/makefile compiler
* make -f make/makefile compiler
To build just game demonstrations:
* make -f ../make/makefile samples
* make -f make/makefile samples
To build everything:
* make -f ../make/makefile all
* make -f make/makefile all
### Compiler arguments

View File

@ -57,7 +57,8 @@ all: --prep-build-dir compiler samples tests
compiler: $(objects)
@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