diff --git a/Makefile b/Makefile index 06b1626..a3dfc8b 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,18 @@ +CC=gcc +CXX=g++ +CPPFLAGS=-g + +SRC=$(shell find . -name *.cpp) +OBJ=$(SRC:%.cpp=%.o) +BIN= build/placeholderengine + + .PHONY: all -all: placeholder +all: $(BIN) .PHONY: dep -dep: - +dep: + sudo pacman -S $(CC) .PHONY: info info: @echo "make: Build executable" @@ -11,3 +20,13 @@ info: @echo "make debug: Make with Debug hooked in" @echo "make clean: Clean all files" +$(BIN): $(OBJ) + mkdir -p build + $(CXX) $(CPPFLAGS) -o $(BIN) $(OBJ) + +%.o: %.cpp + g++ -c $< -o $@ + +.PHONY: clean +clean: + rm -rf build diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..a0fa66f --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + std::cout << "Hello, World!"; + return 0; +}