Compare commits
3 Commits
9ebc00b0af
...
ec445d7a44
Author | SHA1 | Date |
---|---|---|
BodgeMaster | ec445d7a44 | |
BodgeMaster | 0c9299b21d | |
BodgeMaster | 57006a6463 |
|
@ -1,2 +1,5 @@
|
||||||
/bin/*
|
/bin/*
|
||||||
!/bin/.placeholder
|
!/bin/.placeholder
|
||||||
|
|
||||||
|
# ignore nano's temp files
|
||||||
|
*.swp
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -1,10 +0,0 @@
|
||||||
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
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
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
|
|
@ -0,0 +1,3 @@
|
||||||
|
int blob() {
|
||||||
|
return 1;
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
int blob();
|
|
@ -0,0 +1,5 @@
|
||||||
|
#include "../lib/libnbt.h"
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
return blob();
|
||||||
|
}
|
Loading…
Reference in New Issue