Proto Makefile
This commit is contained in:
parent
4250bba716
commit
98929dd2c6
23
Makefile
23
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:
|
||||
|
||||
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
6
src/main.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::cout << "Hello, World!";
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user