This repository has been archived on 2020-09-21. You can view files and clone it, but cannot push or open issues or pull requests.
cs2011-cachelab/Makefile

35 lines
808 B
Makefile
Raw Permalink Normal View History

2016-04-24 20:07:46 -04:00
#
# Student makefile for Cache Lab
2016-04-24 20:12:20 -04:00
#
2016-04-24 20:07:46 -04:00
CC = gcc
CFLAGS = -g -Wall -Werror -std=c99
all: csim test-trans tracegen
# Generate a handin tar file each time you compile
2016-04-24 20:12:20 -04:00
-tar -cvf ${USER}-handin.tar csim.c trans.c
2016-04-24 20:07:46 -04:00
csim: csim.c cachelab.c cachelab.h
2016-04-24 20:12:20 -04:00
$(CC) $(CFLAGS) -o csim csim.c cachelab.c -lm
2016-04-24 20:07:46 -04:00
test-trans: test-trans.c trans.o cachelab.c cachelab.h
2016-04-24 20:12:20 -04:00
$(CC) $(CFLAGS) -o test-trans test-trans.c cachelab.c trans.o
2016-04-24 20:07:46 -04:00
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
test: csim.c cachelab.c cachelab.h
$(CC) -o csim csim.c cachelab.c -lm -g -Wall -Wextra -std=c99
2016-04-24 20:07:46 -04:00
#
# Clean the src dirctory
#
clean:
rm -rf *.o
rm -f csim
rm -f test-trans tracegen
rm -f trace.all trace.f*
rm -f .csim_results .marker