diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e85c29f --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ + +CXX := g++ +CXXFLAGS := -std=c++11 -c +LDFLAGS := -g +LDLIBS= + +srcfiles := $(wildcard */*.cpp) +objfiles := $(subst src,obj,$(subst .cpp,.o,$(srcfiles))) + +all: main + +main: $(objfiles) + $(CXX) $(LDFLAGS) -o main $(objfiles) $(LDLIBS) + +obj/%.o: src/%.cpp + mkdir -p obj + $(CXX) $(CXXFLAGS) -o $@ $< diff --git a/main b/main new file mode 100755 index 0000000..6b61fbe Binary files /dev/null and b/main differ diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..5f2a26e --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,6 @@ +#include + +int main(){ + std::cout << "This is another test" << std::endl; + return 0; +}