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
*.out
*.app
# Extras
enigma
dist/*

View file

@ -1,18 +1,19 @@
LIBS = src/libs/*
BUILD_ARGS = -Wall -Werror -Ilibs/
BUILD_ARGS = -Wall -Werror -Isrc/libs/
build: libraries
g++ src/main.cpp -Ldist/* -Ilibs/ -o enigma
g++ src/main.cpp -Ldist/* $(BUILD_ARGS) -o enigma
libraries:
mkdir dist/
for dir in $(LIBS); do \
mkdir -p dist/
for dir in src/libs/*; do\
echo "cd into" $$dir; \
cd $$dir; \
g++ -c *.c -I../;\
mv *.o ../../dist; \
cd -;
g++ -c *.cpp ; \
mv *.o ../../../dist/ ; \
done
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";
using namespace std;
#include <iostream>
#include "strings/strings.cpp"
int main() {
cout << 'Hello World';
std::cout << getString();
return 0;
}