#
# This software is part of the DIGITAL Visual Fortran kit.
# Copyright (C) 1993,1997 Digital Equipment Corporation.
# All rights reserved.
#
# This software is furnished to you under a license by  Digital Equipment
# Corporation and must be used only in  accordance with the terms and conditions
# of that license,  and only with the inclusion of the above copyright notice.
#
# This software is provided as an example that demonstrates a particular
# feature/function of the licensed product. The software is not intended to
# provide a complete solution to any application problem but rather is provided
# as a teaching mechanism.
#
# Users may incorporate any part of this sample into their own source after 
# making appropriate changes to make it suitable for the intended application.
#
# This makefile builds CUSTOM.LIB, CUSTOM.DLL, PROG1.EXE and PROG2.EXE
# This sample demonstrates sharing memory in a DLL between two programs running concurrently
#

# Nmake macros for building DIGITAL Visual Fortran applications
!include <dfinc.mak>

all: custom.dll prog1.exe prog2.exe

custom.dll custom.lib: custom.f90
    $(FOR) $(fflags) custom.f90 /dll /link /section:.data,RWS

prog1.exe: prog1.f90 custom.lib
    $(FOR) $(fflags) prog1.f90 custom.lib

prog2.exe: prog2.f90 custom.lib
    $(FOR) $(fflags) prog2.f90 custom.lib

clean:
    -del custom.dll
    -del custom.lib
    -del custom.exp
    -del prog1.exe
    -del prog2.exe
