Proto Makefile

This commit is contained in:
Lillian Salehi 2024-10-03 23:55:40 -05:00
parent 4250bba716
commit 98929dd2c6
2 changed files with 28 additions and 3 deletions

View File

@ -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:
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

6
src/main.cpp Normal file
View File

@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "Hello, World!";
return 0;
}