-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acb5f75
commit 6695140
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
################################################################################ | ||
# Fill these out for your own project | ||
################################################################################ | ||
|
||
# The name of your executable | ||
PROGRAM:= | ||
|
||
# A good default | ||
CXX:=g++ | ||
|
||
# Add whatever flags you need | ||
CXXFLAGS:=-std=c++11 | ||
|
||
# Add whatever flags or external libraries you need | ||
LDFLAGS:=-Wl,-rpath,$(CONDA_PREFIX)/lib | ||
|
||
################################################################################ | ||
# From here on is "boilerplate" alter at your own risk | ||
################################################################################ | ||
|
||
SOURCES:=$(shell find . -iname "*.cxx" -o -iname "*.cpp" -o -iname "*.cc") | ||
OBJECTS:=$(addsuffix .o, $(basename $(SOURCES)))) | ||
|
||
all: $(PROGRAM) | ||
|
||
%.cxx: %.o | ||
$(CXX) -c -o $@ $^ $(CXXFLAGS) | ||
|
||
%.cpp: %.o | ||
$(CXX) -c -o $@ $^ $(CXXFLAGS) | ||
|
||
%.cc: %.o | ||
$(CXX) -c -o $@ $^ $(CXXFLAGS) | ||
|
||
$(PROGRAM): $(OBJECTS) | ||
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS) | ||
|
||
clean: | ||
find . -name '*.o' -delete | ||
rm -f $(PROGRAM) | ||
|