created initial make file and test main file
This commit is contained in:
parent
0f6209d4e5
commit
c4861329e5
17
Makefile
Normal file
17
Makefile
Normal 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 $@ $<
|
6
src/main.cpp
Normal file
6
src/main.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
|
||||
int main(){
|
||||
std::cout << "This is another test" << std::endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user