The following sample illustrates the make file (MAK):

#
# Makefile module: WPSTYLER.MAK
#

.SUFFIXES: .c .obj .dll .idl .h .ih .rc .res

SC        = sc
SCFLAGS   = -maddstar -S128000 -C128000 -mnoint -v
SCLIST    = -s "ih;h;c;def"

TOOLKIT   = c:\toolkit
IBMCPP    = c:\ibmcpp

INCLUDE   = $(TOOLKIT)\h;$(IBMCPP)\include;.;$(INCLUDE)
SMINCLUDE = S(TOOLKIT)\idl;$(INCLUDE);$(SMINCLUDE)
LIB       = $(TOOLKIT)\lib;$(IBMCPP)\lib;$(LIB)
CFLAGS    = -Ge- -Ss+ -C+ -Kb -Q+ -Ms
LFLAGS    = /MAP /NOL /NOI /EXEPACK:2 /PACKCODE /PACKDATA /FAR /ALIGN:4

b=wpstyler

all:        $(b).dll $(b).ih $(b).hlp

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

$(b).dll:   $(b).ih $(b).obj $(b).def $(b).res
            link386 $(b) $(LFLAGS), $(b).dll, $(b).map, somtk, $(b)
            rc $(b).res $(b).dll
            mapsym $(b).map

$(b).obj:   $(b).c $(b).h

$(b).res:   $(b).rc $(b).ico
            rc -r $(b).rc

$(b).ih:    $(b).idl
            $(SC) $(SCFLAGS) $(SCLIST) $(@B).idl

$(b).hlp:   $(b).ipf
            ipfc $(b).ipf

clean:
            -del $(b).ih  $(b).h  $(b).obj  $(b).dll
            -del $(b).map   $(b).sym  $(b).res  $(b).def


[Back] [Next]