aboutsummaryrefslogtreecommitdiff
path: root/cachelab-handout/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'cachelab-handout/Makefile')
-rw-r--r--cachelab-handout/Makefile26
1 files changed, 15 insertions, 11 deletions
diff --git a/cachelab-handout/Makefile b/cachelab-handout/Makefile
index 1712d8c..6fc127d 100644
--- a/cachelab-handout/Makefile
+++ b/cachelab-handout/Makefile
@@ -5,21 +5,25 @@
CC = gcc
CFLAGS = -g -Wall -Werror -std=c99 -m64
-all: csim test-trans tracegen
- # Generate a handin tar file each time you compile
- -tar -cvf ${USER}-handin.tar csim.c trans.c
+CXX = g++
+CXXFLAGS = -g -Wall -Werror -std=c++17 -m64
-csim: csim.c cachelab.c cachelab.h
- $(CC) $(CFLAGS) -o csim csim.c cachelab.c -lm
+# all: csim test-trans tracegen
+# # Generate a handin tar file each time you compile
+# -tar -cvf ${USER}-handin.tar csim.c trans.c
-test-trans: test-trans.c trans.o cachelab.c cachelab.h
- $(CC) $(CFLAGS) -o test-trans test-trans.c cachelab.c trans.o
+csim: csim.cc cachelab.c cachelab.h
+ $(CC) $(CFLAGS) -c cachelab.c -o cachelab.o
+ $(CXX) $(CXXFLAGS) -o csim csim.cc cachelab.o -lm
-tracegen: tracegen.c trans.o cachelab.c
- $(CC) $(CFLAGS) -O0 -o tracegen tracegen.c trans.o cachelab.c
+# test-trans: test-trans.c trans.o cachelab.c cachelab.h
+# $(CC) $(CFLAGS) -o test-trans test-trans.c cachelab.c trans.o
-trans.o: trans.c
- $(CC) $(CFLAGS) -O0 -c trans.c
+# tracegen: tracegen.c trans.o cachelab.c
+# $(CC) $(CFLAGS) -O0 -o tracegen tracegen.c trans.o cachelab.c
+
+# trans.o: trans.c
+# $(CC) $(CFLAGS) -O0 -c trans.c
#
# Clean the src dirctory