The examples can be built using Makefile or CMake. You can use whatever build system you want. Toolchain files for HuC/PCEas and cc65/ca65 are provided in the cmake directory.
Here's a quick tutorial on how to rebuild HuC/pceas from source.
You can either fork the git repository:
git clone [email protected]:BlockoS/huc.git
Or download a zip file of the master branch:
wget https://github.com/BlockoS/huc/archive/master.zip
unzip master.zip
Now you can build the compilers by runnnig Make
with
make
Advanced or reckless users can use CMake
.
mkdir build
cd build
cmake ../src -DCMAKE_INSTALL_PREFIX=..
cmake --build .
cmake --build . --target install
All the generated executables will be located in the bin
directory.
Open your prefered terminal. Go to the <HUDK_PATH>/example
directory, and simple run:
make HUDK_TOOLS_PATH=../build/install/bin/ \
HUDK_INCLUDE_PATH=../include/ \
HUC_PATH=<path to huc/pceas bin directory>
Don't forget to change DHUDK_TOOLS_PATH
if you installed the HuDK tools in another directory.
The roms will be located in the build/asm
and build/C
directories.
Open your prefered terminal. Go to the <HUDK_PATH>/example
directory, and create a build
directory.
Go to that directory and run CMake
configuration pass.
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=../cmake/huc-toolchain.cmake \
-DHUDK_TOOLS_PATH=../../build/install/bin/ \ -DHUDK_INCLUDE_PATH=../../include/ \
-DHUC_PATH=<path to huc/pceas bin directory>
If you plan to build C example, don't forget to set the PCE_INCLUDE
environment variable.
export PCE_INCLUDE=../../include
You can then build the examples by either typing
cmake --build .
or
make
The roms will be located in the asm
directory.