You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.1 KiB
75 lines
2.1 KiB
!INCLUDE ..\makefile.inc
|
|
|
|
#
|
|
# retail flags
|
|
CL = $(CL) -c -AS -G2sw -Os -D__MSC__ -W3 -Zpe
|
|
MASM = $(ASM) $(INCS)
|
|
#
|
|
# debug flags
|
|
#
|
|
|
|
!if !$(FREEBUILD)
|
|
DEBUG=1
|
|
CDEBUG = /Od /Oi /Zd
|
|
ADEBUG = -Zd
|
|
LDEBUG = /LI
|
|
!endif
|
|
|
|
!ifdef DEBUG
|
|
CL = $(CL) $(CDEBUG)
|
|
MASM = $(MASM) $(ADEBUG)
|
|
LDEBUG = $(LDEBUG)
|
|
!endif
|
|
|
|
INCS = -I..\inc -I..\..\inc -I..\toolhelp
|
|
INCLUDES=..\inc;..\..\inc;..\toolhelp;$(SDK_INC_PATH)
|
|
|
|
OBJ = $(DEST)\drwatson.obj $(DEST)\disasm.obj $(DEST)\getsym.obj $(DEST)\watson.obj $(DEST)\error.obj
|
|
|
|
RES_DIR=.\messages\$(ALT_PROJECT)
|
|
|
|
|
|
all: $(DEST)\drwatson.exe
|
|
|
|
.c{$(DEST)}.obj:
|
|
set include=$(INCLUDES)
|
|
$(CL) -Fo$* $(*F).c
|
|
|
|
$(DEST)\drwatson.obj: drwatson.c drwatson.h disasm.h str.h
|
|
|
|
$(DEST)\error.obj: error.c str.h
|
|
|
|
$(DEST)\disasm.obj : disasm.c disasm.h
|
|
|
|
$(DEST)\getsym.obj : getsym.c drwatson.h disasm.h
|
|
|
|
$(DEST)\watson.obj : watson.asm
|
|
$(MASM) watson.asm,$(DEST)\watson,$(DEST)\watson.lst;
|
|
|
|
$(DEST)\drwatson.rc : $(RES_DIR)\drwatson.rc
|
|
copy $? $@
|
|
|
|
$(DEST)\drwatson.rcv : $(RES_DIR)\drwatson.rcv
|
|
copy $? $@
|
|
|
|
$(DEST)\drwatson.res: $(DEST)\drwatson.rc $(DEST)\drwatson.rcv ..\inc\common.ver str.h
|
|
set INCLUDE=$(INCLUDES)
|
|
$(RC) -r $(INCS) $(DEST)\drwatson.rc
|
|
|
|
$(DEST)\sherlock.lnk: makefile.sub
|
|
echo $(DEST)\drwatson.obj $(DEST)\disasm.obj $(DEST)\getsym.obj $(DEST)\watson.obj $(DEST)\error.obj>$@
|
|
echo $(DEST)\drwatson.exe>>$@
|
|
echo $(DEST)\drwatson.map>>$@
|
|
echo /batch ..\lib\$(ALT_PROJECT)\libw ..\lib\slibcew ..\toolhelp\$(DEST)\toolhelp>>$@
|
|
echo drwatson.def /ALIGN:16 /NOE /NOD /MAP;>>$@
|
|
|
|
$(DEST)\drwatson.exe: $(DEST)\sherlock.lnk $(DEST)\drwatson.res $(DEST)\sherlock.lnk drwatson.def \
|
|
$(DEST)\drwatson.obj $(DEST)\disasm.obj $(DEST)\getsym.obj $(DEST)\watson.obj $(DEST)\error.obj
|
|
$(LINK) $(LDEBUG) @$(DEST)\sherlock.lnk
|
|
mapsym -o $*.sym $*
|
|
$(RC) -t -30 $(DEST)\drwatson.res $(DEST)\drwatson.exe
|
|
binplace -o $(ALT_PROJECT_TARGET) $(DEST)\drwatson.exe $(DEST)\drwatson.map $(DEST)\drwatson.sym
|
|
|
|
# note that TOOLHELP.LIB must exist somewhere on your lib path
|
|
|
|
clean: all
|