#
# makefile:
#       makefile for 001/wicpm_user directory.
#       For use with IBM NMAKE, which comes with the IBM compilers,
#       the Developer's Toolkit, and the DDK.
#
#       All the makefiles have been restructured with V1.0.0.
#
#       Called from:    main makefile
#
#       Input:          *.html
#
#       Output:         ../../wicpm.inf
#
#       Edit "setup.in" to set up the make process.
#

# Say hello to yourself.
!if [@echo +++++ Entering $(MAKEDIR)]
!endif

# include setup (compiler options etc.)
!include ..\..\setup.in

# FIXED MACROS
# ------------
#
# You probably need not change the following.
#

# Define the suffixes for files which NMAKE will work on.
# .SUFFIXES is a reserved NMAKE keyword ("pseudotarget") for
# defining file extensions that NMAKE will recognize in inference
# rules.
.SUFFIXES: .html .ipfc .inf

# OUTPUTDIR specifies the directory where all the output .OBJ
# files will be created in.
OUTPUTDIR = $(PROJECT_OUTPUT_DIR)

!if [@md $(OUTPUTDIR) 2> NUL]
!endif

# The main target:
# If we're called from the main makefile, MAINMAKERUNNING is defined,
# and we'll set $(OBJS) as our targets (which will go on).
# Otherwise, we call the main makefile, which will again call ourselves later.
all:   \
!ifndef MAINMAKERUNNING
    callmainmake
    @echo ----- Leaving $(MAKEDIR)
!else
    ..\..\wicpm.inf
    @echo ----- Leaving $(MAKEDIR)
!endif

callmainmake:
    @echo $(MAKEDIR)\makefile: Recursing to main makefile.
    @cd ..\..
    @nmake
    @echo $(MAKEDIR)\makefile: Returned from main makefile. Done.

$(OUTPUTDIR)\wicpm.ipf: *.html *.gif
    ..\html2ipf wicpm_user.html $(OUTPUTDIR)\$(@B).ipf

..\..\wicpm.inf: $(OUTPUTDIR)\$(@B).ipf
    ipfc /inf $(OUTPUTDIR)\$(@B).ipf ..\..\$(@B).inf
