This is a fun AoC skeleton for C++, containing a makefile with arguments to compile or debug the current day or a specific day's file. It also prints a snowman with randomly generated snow to stdout when compiling. ☃️
Make a src
, res
and build
folder. Put your source files in the src
directory with the name DayX.cpp
where X
is the 2 digit number for the day e.g. Day02.cpp
. Put any resources (e.g. text files) in the res
directory. Your code will be compiled to the build
directory.
To compile and run your code use make
with one of the following arguments:
all
- Compile all daystoday
- Compile and run the current dayspecific
- Compiles and runs the day specified by theAOCDAY
environment variable (useexport AOCDAY=X
to set this where X is the 2 digit day code)bah-humbug
- Debug the current day using gdb with the-O0
flagbah-humbug-specific
- Debug the day specified by theAOCDAY
environment variable in gdb (useexport AOCDAY=X
to set this where X is the 2 digit day code)clean
- remove everything in the build directory