created initial make file and test main file

This commit is contained in:
Samuel Walker 2024-04-22 22:44:10 -06:00
parent 0f6209d4e5
commit c4861329e5
3 changed files with 23 additions and 0 deletions

17
Makefile Normal file
View File

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

BIN
main Executable file

Binary file not shown.

6
src/main.cpp Normal file
View File

@ -0,0 +1,6 @@
#include <iostream>
int main(){
std::cout << "This is another test" << std::endl;
return 0;
}