CC=gcc
CFLAGS=-g -Wall

.PHONY: clean all

all: RealModeExploitation TestModeExploitation

RealModeExploitation: RealModeExploitation.c ../../0x04_hammerlib/afunc.c ../../0x04_hammerlib/afunc.h ../../0x04_hammerlib/asm.h ../../0x04_hammerlib/hammer.c ../../0x04_hammerlib/hammer.h ../../0x04_hammerlib/util.c ../../0x04_hammerlib/util.h ../../0x02_memlib/memoryInspect.c ../../0x02_memlib/memoryInspect.h ../../0x02_memlib/util.c ../../0x02_memlib/util.h ../../0x02_memlib/pfnInspect.c ../../0x02_memlib/pfnInspect.h ../hammer.c ../hammer.h ../merge.c ../merge.h ../util.c ../util.h
	$(CC) -o$@ $(CFLAGS) RealModeExploitation.c ../../0x04_hammerlib/afunc.c ../../0x04_hammerlib/hammer.c ../../0x04_hammerlib/util.c ../../0x02_memlib/memoryInspect.c ../../0x02_memlib/util.c ../../0x02_memlib/pfnInspect.c ../hammer.c ../merge.c ../util.c -lpthread

TestModeExploitation: TestModeExploitation.c  ../../0x04_hammerlib/afunc.c ../../0x04_hammerlib/afunc.h ../../0x04_hammerlib/asm.h ../../0x04_hammerlib/hammer.c ../../0x04_hammerlib/hammer.h ../../0x04_hammerlib/util.c ../../0x04_hammerlib/util.h ../../0x02_memlib/memoryInspect.c ../../0x02_memlib/memoryInspect.h ../../0x02_memlib/util.c ../../0x02_memlib/util.h ../../0x02_memlib/pfnInspect.c ../../0x02_memlib/pfnInspect.h ../hammer.c ../hammer.h ../merge.c ../merge.h ../util.c ../util.h
	$(CC) -o$@ $(CFLAGS) TestModeExploitation.c ../../0x04_hammerlib/afunc.c ../../0x04_hammerlib/hammer.c ../../0x04_hammerlib/util.c ../../0x02_memlib/memoryInspect.c ../../0x02_memlib/util.c ../../0x02_memlib/pfnInspect.c ../hammer.c ../merge.c ../util.c -lpthread

clean:
	-rm RealModeExploitation
	-rm TestModeExploitation
