# makefile for Mastermind C example LOGISCOPE_INSTALL = ..\..\..\.. OUTDIR = Objects INDIR = ..\Mstrmind RM = DEL SRC = \ $(INDIR)\base.c \ $(INDIR)\machine.c \ $(INDIR)\master.c \ $(INDIR)\player.c \ $(INDIR)\score.c \ $(INDIR)\util.c \ $(INDIR)\write.c OBJ = \ $(OUTDIR)\base.obj \ $(OUTDIR)\machine.obj \ $(OUTDIR)\master.obj \ $(OUTDIR)\player.obj \ $(OUTDIR)\score.obj \ $(OUTDIR)\util.obj \ $(OUTDIR)\write.obj "$(OUTDIR)" : if not exist "$(OUTDIR)" mkdir "$(OUTDIR)" LIBS= CPPFLAGS= /c /MD /W3 /GX /D "WIN32" /Tc CPP=cl LINK=link .SUFFIXES: .c {$(INDIR)}.c{$(OUTDIR)}.obj: $(CPP) @<< $(CPPFLAGS) $(INDIR)\$(@B).c /Fo$@ << #ttp creation CREATE=create -test -lang C $(TTP) -make "cmd /c Makelog.bat" -exec "Objects/lgmstrmind.exe" -- $(CPP) TTP=./TestC.ttp #End ttp creation all: @echo "Possible targets are:" @echo " mstrmind: to build the mastermind binary" @echo " lgmstrmind: to build the instrumented binary" @echo " ttp: to create and build the Logiscope project file" @echo " clean: to clean the environement" mstrmind : $(OUTDIR)\mstrmind.exe lgmstrmind: $(OUTDIR)\lgmstrmind.exe $(OUTDIR)\mstrmind.exe: $(OUTDIR) $(OBJ) $(LINK) $(OBJ) /out:$@ $(LIBS) mt.exe -manifest $@.manifest -outputresource:$@;1 $(OUTDIR)\lgmstrmind.exe : $(OUTDIR) $(OBJ) $(LINK) $(OBJ) /out:$@ "$(LOGISCOPE_INSTALL)\instr\lib\vlgtc.lib" $(LIBS) mt.exe -manifest $@.manifest -outputresource:$@;1 clean : -$(RM) $(OBJ) $(OUTDIR)\mstrmind.exe $(OUTDIR)\lgmstrmind.exe $(INDIR)\*.inst.* TestC.ttp ttp: $(MAKE) CPP=$(CREATE) mstrmind batch $(TTP)