aboutsummaryrefslogtreecommitdiff
path: root/pa7_lru/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'pa7_lru/Makefile')
-rw-r--r--pa7_lru/Makefile44
1 files changed, 11 insertions, 33 deletions
diff --git a/pa7_lru/Makefile b/pa7_lru/Makefile
index bf179e3..1302716 100644
--- a/pa7_lru/Makefile
+++ b/pa7_lru/Makefile
@@ -1,42 +1,20 @@
-# CSCI3753 - FA23 PA7
-
-CC = gcc
-CFLAGS = -c -g -Wall -Wextra
-LFLAGS = -g -Wall -Wextra
+OBJS_COMMON = simulator.o programs.o
+OBJS_BASIC = pager-basic.o
+OBJS_LRU = pager-lru.o
VPATH += ../common
-
-SUBMITFILES = pager-lru.c
-
-.PHONY: all clean
+CFLAGS = -Wall -Wextra -g
all: test-basic test-lru
-test-basic: simulator.o pager-basic.o programs.o
- $(CC) $(LFLAGS) $^ -o $@
-
-test-lru: simulator.o pager-lru.o programs.o
- $(CC) $(LFLAGS) $^ -o $@
+test-basic: $(OBJS_COMMON) $(OBJS_BASIC)
+ cc $(CFLAGS) $^ -o $@
-simulator.o: simulator.c programs.o simulator.h
- $(CC) $(CFLAGS) $<
+test-lru: $(OBJS_COMMON) $(OBJS_LRU)
+ cc $(CFLAGS) $^ -o $@
-programs.o: programs.c simulator.h
- $(CC) $(CFLAGS) $<
-
-pager-basic.o: pager-basic.c simulator.h programs.c
- $(CC) $(CFLAGS) $<
-
-pager-lru.o: pager-lru.c simulator.h programs.c
- $(CC) $(CFLAGS) $<
+%.o: %.c
+ cc $(CFLAGS) -c $< -o $@
clean:
- rm -f test-basic test-lru test-predict test-api
- rm -f *.o
- rm -f *~
- rm -f *.csv
- rm -f *.pdf
-
-submit:
- @read -r -p "please enter your identikey username: " username; \
- tar -cvf PA7-$$username.txt $(SUBMITFILES)
+ rm *.o test-basic test-lru