.cacheautodepend

PROJ = dlg  
OBJS  = $(PROJ).obj 

CDEFINES = -DSTRICT 

PCH = -H -H=$(PROJ).csm -Hc 
CFLAGS = $(CDEFINES) /c  /I$(MAKEDIR)\..\include -v $(PCH) #Compile options
LFLAGS = /c /x /L$(MAKEDIR)\..\lib /v                      #Link options
RFLAGS = /i$(MAKEDIR)\..\include                           #Res compiler options


$(PROJ).exe:  $(OBJS)  dll.lib                   #Target makes child app first
	$(MAKEDIR)\tlink32 /Tpe /ap @&&|                    
        $(LFLAGS) +
	c0x32 $(OBJS)                            #Startup and objs
	$&                                       #Target
                                                 #Map file 
        cw32 dll.lib import32                    #Static and import libs
                                                 #Module definition file
                                                 #Resources
|

dll.lib: dll.dll
   $(MAKEDIR)\implib.exe $&.lib $&.dll

dll.dll: dll.obj dll.res
     $(MAKEDIR)\tlink32 /Tpd /aa @&&|
     $(LFLAGS) +
     c0d32 $&                               #Startup and objs
     $<                                     #Target
                                            #Map file
     cw32 import32                          #Static and import libraries
                                            #Module definition file
     dll.res                                #Resources 
|

.cpp.obj:
  $(MAKEDIR)\bcc32 $(CFLAGS) { $** }
.rc.res:
  $(MAKEDIR)\brcc32 $(RFLAGS) $<

clean: 
  @del *..exe *.obj *.map *.res *.csm *.t?2 *.dsw *.~?? *.bak *.rws *.dll *.lib


