#  MAKEFILE for building the
#  Sections DLL and its Test program 

all: test.exe sections.dll
test.exe: test.obj sections.lib
sections.lib: sections.obj sections.def
sections.dll: sections.obj sections.exp

CFLAGS = -c -Od -W4 -Zi -D_X86_=1 -DWIN32 -D_MT -D_DLL
LFLAGS = -debug:full -debugtype:cv
SUBSYS = -subsystem:console
LIBS = crtdll.lib

.c.obj:
   cl386 $(CFLAGS) $*.c

.obj.lib:
   lib32 -machine:$(CPU) $*.obj -out:$*.lib -def:$*.def

.obj.exe:
   link32 $(LFLAGS) $(SUBSYS) -out:$*.exe $*.obj \
   $(LIBS) sections.lib

.obj.dll:
   link32 $(LFLAGS) -DLL -entry:_DllMainCRTStartup@12 \
      -out:$*.dll $*.obj $*.exp $(LIBS)
