Compare commits

..

No commits in common. "ec445d7a442026c418e2ff021cffdab0dba9b9cb" and "9ebc00b0afbba07e4bf39a6d509338ce41114772" have entirely different histories.

6 changed files with 10 additions and 25 deletions

3
.gitignore vendored
View File

@ -1,5 +1,2 @@
/bin/* /bin/*
!/bin/.placeholder !/bin/.placeholder
# ignore nano's temp files
*.swp

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
source = $(shell find ./ -name "*.cpp")
headers = $(shell find ./ -name "*.h")
main: $(source) $(headers)
c++ $(source) $(headers) -o ./bin/minecraft -Wall -Wextra
clean:
rm -rv bin/
mkdir bin/
touch bin/.placeholder

View File

@ -1,13 +0,0 @@
echo "Building libs..."
mkdir -pv bin/lib
for lib in $(find ./src/lib -name "*.cpp"); do
echo "Compiling $lib"
c++ -shared -o $(sed -e 's/^.\/src/.\/bin/;s/cpp$/so/' <<< $lib) $lib;
done
echo "Building tools..."
mkdir -pv bin/tools
# Commands for every program need to be given individually because we can't
# just add all shared libraries to all programs.
# Or can we? Idk, cba to find out.
c++ src/tools/dumpnbt.cpp -Lbin/lib -lnbt -o bin/tools/dumpnbt

View File

@ -1,3 +0,0 @@
int blob() {
return 1;
}

View File

@ -1 +0,0 @@
int blob();

View File

@ -1,5 +0,0 @@
#include "../lib/libnbt.h"
int main(int argc, char* argv[]) {
return blob();
}