summaryrefslogtreecommitdiff
path: root/src/main/resources/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/Makefile')
-rw-r--r--src/main/resources/Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/resources/Makefile b/src/main/resources/Makefile
new file mode 100644
index 00000000..221179a3
--- /dev/null
+++ b/src/main/resources/Makefile
@@ -0,0 +1,35 @@
+# Chisel parallel make template.
+
+HFILES = @HFILES@
+ONCEONLY = @ONCEONLY@
+UNOPTIMIZED = @UNOPTIMIZED@
+OPTIMIZED = @OPTIMIZED@
+
+EXEC = @EXEC@
+OPTIM0 = @OPTIM0@
+OPTIM1 = @OPTIM1@
+OPTIM2 = @OPTIM2@
+CPPFLAGS = @CPPFLAGS@
+CXXFLAGS = @CXXFLAGS@
+LDFLAGS = @LDFLAGS@
+CXX = @CXX@
+
+default: $(EXEC)
+
+clean:
+ $(RM) $(EXEC) $(ONCEONLY) $(UNOPTIMIZED) $(OPTIMIZED)
+
+$(ONCEONLY) $(UNOPTIMIZED) $(OPTIMIZED): $(HFILES)
+
+$(EXEC): $(ONCEONLY) $(UNOPTIMIZED) $(OPTIMIZED) Makefile
+ $(CXX) -o $@ $(filter-out Makefile,$^)
+
+$(ONCEONLY): %.o: %.cpp
+ $(CXX) -c -o $@ $(OPTIM0) $(CPPFLAGS) $(CXXFLAGS) $<
+
+$(UNOPTIMIZED): %.o: %.cpp
+ $(CXX) -c -o $@ $(OPTIM1) $(CPPFLAGS) $(CXXFLAGS) $<
+
+$(OPTIMIZED): %.o: %.cpp
+ $(CXX) -c -o $@ $(OPTIM2) $(CPPFLAGS) $(CXXFLAGS) $<
+ \ No newline at end of file