Add first version of a Makefile
This commit is contained in:
parent
e63aa18c58
commit
1375560cb4
1 changed files with 25 additions and 0 deletions
25
Makefile
Normal file
25
Makefile
Normal file
|
@ -0,0 +1,25 @@
|
|||
CXX=g++
|
||||
CXXFLAGS=-Wall -Wextra -O2 -std=c++14
|
||||
CXXLIBS=
|
||||
|
||||
# In `TARGET`, list the names of the `main_[stuff].cpp` you'd like to compile
|
||||
# into a `[stuff].bin`.
|
||||
TARGETS=
|
||||
|
||||
OBJS=Implicit.o \
|
||||
Mesh.o
|
||||
|
||||
all: $(TARGETS:=.bin)
|
||||
|
||||
%.bin: main_%.cpp $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(CXXLIBS) $(OBJS) $< -o $@
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
############################################################
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJS)
|
Loading…
Reference in a new issue