home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
odtlktv4.zip
/
ODTLKT
/
TOOLKIT
/
SAMPLES
/
OPENDOC
/
PARTS
/
PUSHBTN
/
PUSHBTN.MAK
< prev
next >
Wrap
Text File
|
1995-12-15
|
6KB
|
147 lines
#***************************************************************************
#
# File Name : PUSHBTN.MAK
#
# Description : Makefile for the Push Button Part OpenDoc part handler class
#
# Notes : This makefile should be run from this sample's subdirectory.
#
# Regarding the DEBUG macro statements:
# The file is shipped so that the build will not produce
# debug information ("DEBUG = /Ti-" is uncommented and
# "DEBUG = /T+" is commented out). If you prefer to build
# with debug information, comment out the first DEBUG macro
# and uncomment the second one.
#
# Entry Points: N/A
#
# (C) COPYRIGHT International Business Machines Corp. 1995
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# DISCLAIMER OF WARRANTIES. The following [enclosed] code is
# sample code created by IBM Corporation. This sample code is not
# part of any standard or IBM product and is provided to you solely
# for the purpose of assisting you in the development of your
# applications. The code is provided "AS IS", without
# warranty of any kind. IBM shall not be liable for any damages
# arising out of your use of the sample code, even if they have been
# advised of the possibility of such damages.
#
#***************************************************************************
#===========================================================================
# MACRO DEFINITIONS
#===========================================================================
PARENT = cntnrprt
FILENAME = pushbtn
DEBUG = /Ti-
#DEBUG = /Ti+
BASEPATH = ..\..\..\..
BETAPATH = $(BASEPATH)\BETA
PUBLIC = ..\public
BETAPUBLIC = $(BETAPATH)\samples\opendoc\parts\public
INCLUDEPATH = .;$(PUBLIC);$(BETAPUBLIC)
#---------------------------------------------------------------------------
# XHLIST is the list of .XH files that need to be generated from the
# .IDL file.
# OBJLIST is the list of .OBJ files that will be linked with your .DLL file.
# PARENTLIB is the list of .LIB files generated by your parent that will be
# linked with your .DLL file.
# Note: You must comment out the definition of PARENTLIB macro if you are
# subclassing from ODPart class. This means that no parent's
# library file will be link with your .DLL file.
#---------------------------------------------------------------------------
XHLIST = $(BETAPUBLIC)\$(PARENT).xh $(FILENAME).xh
OBJLIST = $(FILENAME).obj
PARENTLIB = $(BETAPUBLIC)\$(PARENT).lib
#===========================================================================
# PSEUDOTARGETS:
#===========================================================================
all: $(XHLIST) $(FILENAME).dll $(FILENAME).lib
.SUFFIXES:
.SUFFIXES: .idl .xh .cpp .hpp .rc .c .lib .dll .obj
#===========================================================================
# INFERENCE RULES:
#===========================================================================
.idl.xh:
sc -D _PLATFORM_OS2_ -I$(PUBLIC) -I$(BETAPUBLIC) "-sxh;xih;def" -S70000 -p $(@B).idl
.idl.cpp:
sc -D _PLATFORM_OS2_ -I$(PUBLIC) -I$(BETAPUBLIC) "-sxh;xih;xc" -S70000 -p $(@B).idl
.cpp.obj:
icc.exe /Gm+ /Ge- /Tl- /Fd /Gd+ /I$(INCLUDEPATH) /Sp4 /Q /Fi /Si $(DEBUG) /N30 /C %s
#===========================================================================
# DESCRIPTION BLOCKS (TARGETS):
# Each .OBJ file should have its own description block with the right
# dependent(s).
#===========================================================================
$(BETAPUBLIC)\$(PARENT).xh:
@echo ************************************************** & \
echo Cannot find $@ & \
echo ************************************************** & \
echo **** **** & \
echo *** You need to make $(PARENT) before you *** & \
echo *** can build this sample *** & \
echo **** **** & \
echo ************************************************** & \
exit
$(FILENAME).obj: $*.cpp $*.hpp
$(FILENAME).res: $*.rc $*.hpp $*.bmp
rc -r -I $(PUBLIC) $(FILENAME).rc $@
$(FILENAME).dll: \
$(OBJLIST) \
$*.res \
$(PARENTLIB) \
$(FILENAME).def
icc.exe @<<
/Tl- /Fd /Ge- /Gd+ /Sp4 /Q /Fi /Si
/N30 $(DEBUG)
/B" /de /pmtype:pm /nologo /nod /noi /noe /map"
/Fe$*.dll
/Fm$*.map
$(OBJLIST)
somtk.lib
os2386.lib
os2cmbsi.lib
opendoc.lib
$(PARENTLIB)
$(FILENAME).def
<<
rc $*.res $*.dll
$(FILENAME).lib: $(FILENAME).dll
@echo IMPLIB::Import library contruction
IMPLIB /NOLOGO $(FILENAME).lib $(FILENAME).dll
#---------------------------------------------------------------------------
# Remove build output
#---------------------------------------------------------------------------
CLEANUP:
@echo ***************************************************** & \
echo ** Cleaning Push Button part sample build output ** & \
echo *****************************************************
-del *.def *.x* *.dll *.map *.obj *.res *.lib >nul 2>&1
-if exist CSET2PRE del CSET2PRE /n >nul 2>&1 & rd CSET2PRE >nul 2>&1