OBJ1 = sample.obj
LDF = /CO /NOD /MAP
all : sample.exe testlib.dll


# Update the resource if necessary

sample.res : sample.rc sample.h
    rc -r sample.rc


# Update the C object file if necessary

sample.obj : sample.c sample.h
    cl -c -AL -W3 -Gsw -Oas -Zpei sample.c


# Update the FORTRAN object files if necessary

ack.obj : ack.for
    fl -c -Gw -Aw -G2 -Zi ack.for


# Update the C object file if necessary

DLLstuff.obj: DLLstuff.c
    cl -c -AL -W3 -Gsw -Aw -Zi DLLstuff.c
 

# Update the .DLL if necessary
testlib.dll : ack.obj DLLstuff.obj
    link @<<
ack.obj DLLstuff.obj
testlib.dll
testlib.map
/INF /MAP /CO /NOD /NOE ldllfewc.lib ldllcew.lib libw.lib
testlib.def
;
<<
    rc testlib.dll


# Update the executable file if necessary, and if so,
# add the resource back in.

sample.exe : $(OBJ1) sample.def sample.res
    link @<<
sample.obj
sample.exe
sample.map
/CO /NOD /MAP llibcew libw
sample.def
;
<<
    rc sample.res sample.exe
