home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
pendem.zip
/
MAKEFILE
< prev
next >
Wrap
Text File
|
1994-07-19
|
7KB
|
215 lines
#******************************************************************************
#
# IBM Confidential
#
# Copyright (c) IBM Corporation 1992
#
# All Rights Reserved
#
#******************************************************************************
#
# The purpose of this template is to outline all the areas and items
# that need to be covered. The following are some of those items
#
# Handle Non Specific Machine Layouts - This will make the makefile
# ----------------------------------- more generic and portable
# regardless of the development
# tree. Macros should have
# relative paths to information
# in order for the makefiles to be
# more portable.
#
#
# National Language Support - The makefile will have to
# ------------------------- support all national language
# versions. This applies to all
# modules that will contain trans-
# lations even if that translation
# is not the result of specific MRI
# which is part of the component.
#
# Environment Setup - The makefile will setup the
# ----------------- environment (ie. paths to tools,
# etc). This will insure that
# people involved can use the
# makefile without worrying
# about their local environment.
#
# Use of Inline Response Files - The makefile will dynamically
# ---------------------------- generate linker response files,
# def files etc. to support NLS,
# MMIO and other build variations.
#
# The following is a list of the order in which the makefile should be written.
#
# Dot Directives - ie.
# .SUFFIXES:
# .SILENT:
# .IGNORE:
# .PRECIOUS:
#
# Environment Setup
# Conditional setup and user defined macros
# Compiler Location w/ includes, libs and tools etc.
# Compiler/tools Macros
# Compiler/tools Options
# Additional user defined macros
#
# Rules for Compiling and assembling
# .c.obj
# .asm.obj
# .exe.com
#
# Common target information "common.mak" for dependency generation and
# nls processing
#
# User Target Information
# all
# debug
#
# Specific Description Blocks
#
# Description block for dynamic dependencies generation "depend.mak"
#
# Indirect Dependencies for SOURCE "depend.mak"
# .obj: .c .h .inc
#
# It is very important to have the makefile in the above order to make both
# the developers job and the build departments job that much easier.
#
# ****** NOTE ******
#
# Please make sure that the MAKEFILE is documented. There have been many
# occasions that someone other then people working on your component have
# had a chance to inquire about what the dependencies are and what files
# are created as a result.
#
# The makefile should be a document in itself. It will discribe how to
# to create the component. It is VERY inportant that any special
# consideration be documented. The following is an example of a problem
# and its documentation.
#
#****************************************************************************
# Dot directive definition area (usually just suffixes)
#****************************************************************************
.SUFFIXES:
.SUFFIXES: .c .obj .dll .h .rc .res .exe .map .lib
#****************************************************************************
# Environment Setup for the component(s).
#****************************************************************************
#
# Conditional Setup Area and User Defined Macros
#
!ifndef LANG
LANG=us
!endif
!ifndef MRI
MRI=mri
!endif
####
#### Path definitions for lib,tools,etc.
####
IH = x:\src\pen\h
TLKH = x:\src\pen\pentkt\h
PENH = .;$(IH);$(TLKH)
TLKL = x:\src\pen\pentkt\lib
PENL = .;$(ILIB);$(TLKL);x:\src\pen\lib
TOOLS = x:\tools
CSET2H = $(TOOLS)\cset2\include;$(TOOLS)\cset2\include\sys
CSET2L = $(TOOLS)\cset2\lib
CSET2B = $(TOOLS)\cset2\bin
CSET2M = $(TOOLS)\cset2\locale;$(TOOLS)\cset2\help
OS2H = $(TOOLS)\toolkt20\c\os2h
OS2L = $(TOOLS)\toolkt20\os2lib
OS2B = $(TOOLS)\toolkt20\os2bin
MRIPATH = x:\$(MRI)\pen
!if [set INCLUDE=$(PENH);$(CSET2H);$(OS2H)] || \
[set LIB=$(PENL);$(CSET2L);$(OS2L);] || \
[set PATH=$(CSET2B);$(OS2B);$(TOOLS);$(PATH)] || \
[set DPATH=$(CSET2M);$(DPATH)]
!endif
DEBUG= /Ti+ /O-
CC = icc /C+ /DOS2_2 /DINCL_32 /Fd+ /Gd-e+ /Smr+s+
# going to link to these
PBLIBS = OS2386 penpm
PLAYB_LINKOPTS = /NOE /ALIGN:16 /EXEPACK /M /BASE:0x10000 /Line
RC = rc -r
.rc.res:
$(RC) $*.rc
.c.obj:
$(CC) $*.c
# include rules for NLS and incremental builds
#!include "$(IH)\common.mak"
# everything to be built
all : book.exe
# tells MASTER makefile what to clean
clean:
-del *.dll
-del *.sym
-del *.obj
-del *.map
-del *.res
book.exe: book.obj bookfl.obj bookrs.res book.def
link386 @<<
$(PLAYB_LINKOPTS) book.obj bookfl.obj,
book.exe,
book.map,
$(PBLIBS),
book.def
<<
rc bookrs.res book.exe
mapsym -n book.map
bookrs.res: bookrs.rc bookrs.dlg book.ico
rc -r /DINCL_32 bookrs.rc
#****************************************************************************
# Dependency Checking
#****************************************************************************
# if on BUILD machine
!ifndef SARKA
depend.mak: dephold
touch depchk
includes -e -l -I. -I$(IH) -I$(TLKH) -P$$(IH)=$(IH) -P$$(TLKH)=$(TLKH) *.c >$@
includes -e -l -sres -C=rc -C=dlg -I. -I$(IH) -P$$(IH)=$(IH)) *.rc >>$@
-del depchk
# if on SARKA's machine
!else
depend.mak: dephold
touch depchk
includes -e -l -I. -I$(IH) -I$(TLKH) -P$$(IH)=$(IH) -P$$(TLKH)=$(TLKH) *.c >$@
includes -e -l -sres -C=rc -C=dlg -I. -I$(IH) -P$$(IH)=$(IH)) *.rc >>$@
-del depchk
!endif
dephold:
touch $@
!include depend.mak