From 6ff784158f61a082fe6d4332c743a066ef007674 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Thu, 22 Oct 2020 07:50:12 -0500 Subject: Add Project 2 Files --- P2/Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 P2/Makefile (limited to 'P2/Makefile') diff --git a/P2/Makefile b/P2/Makefile new file mode 100644 index 0000000..7ab380c --- /dev/null +++ b/P2/Makefile @@ -0,0 +1,30 @@ +CC=gcc +CFLAGS=-g + +SRCDIR=src +INCLDIR=include +LIBDIR=lib + +mapreduce: $(SRCDIR)/mapreduce.c $(LIBDIR)/utils.o mapper reducer + $(CC) $(CFLAGS) -I$(INCLDIR) $(LIBDIR)/utils.o $(SRCDIR)/mapreduce.c -o mapreduce + +mapper: $(SRCDIR)/mapper.c $(LIBDIR)/utils.o + $(CC) $(CFLAGS) -I$(INCLDIR) $(LIBDIR)/utils.o $(SRCDIR)/mapper.c -o mapper + +reducer: $(SRCDIR)/reducer.c $(LIBDIR)/utils.o + $(CC) $(CFLAGS) -I$(INCLDIR) $(LIBDIR)/utils.o $(SRCDIR)/reducer.c -o reducer + +$(LIBDIR)/utils.o: $(LIBDIR)/utils.c + $(CC) $(CFLAGS) -I$(INCLDIR) -c $(LIBDIR)/utils.c -o $(LIBDIR)/utils.o + +.PHONY: run clean t1 t2 t3 + +#500KB +t1: +# make -i clean +# make + ./mapreduce 5 2 test/T1/F1.txt + +clean: + rm lib/utils.o mapreduce mapper reducer + rm -rf output \ No newline at end of file -- cgit v1.2.3