1
Fork 0

Got building up and running

This commit is contained in:
Jake Howard 2015-10-11 18:25:04 +01:00
parent afd8f51139
commit e6b8cf66e9
4 changed files with 22 additions and 13 deletions

4
.gitignore vendored
View file

@ -26,3 +26,7 @@
*.exe *.exe
*.out *.out
*.app *.app
# Extras
enigma
dist/*

View file

@ -1,18 +1,19 @@
LIBS = src/libs/* BUILD_ARGS = -Wall -Werror -Isrc/libs/
BUILD_ARGS = -Wall -Werror -Ilibs/
build: libraries build: libraries
g++ src/main.cpp -Ldist/* -Ilibs/ -o enigma g++ src/main.cpp -Ldist/* $(BUILD_ARGS) -o enigma
libraries: libraries:
mkdir dist/ mkdir -p dist/
for dir in $(LIBS); do \ for dir in src/libs/*; do\
echo "cd into" $$dir; \
cd $$dir; \ cd $$dir; \
g++ -c *.c -I../;\ g++ -c *.cpp ; \
mv *.o ../../dist; \ mv *.o ../../../dist/ ; \
cd -;
done done
clean: clean:
rm -rf dist/ rm -rf dist/ enigma

View file

@ -0,0 +1,5 @@
#include <iostream>
std::string getString() {
return "Hello World";
}

View file

@ -1,8 +1,7 @@
#include "iostream"; #include <iostream>
#include "strings/strings.cpp"
using namespace std;
int main() { int main() {
cout << 'Hello World'; std::cout << getString();
return 0; return 0;
} }