home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
maketmpl
< prev
next >
Wrap
Text File
|
1997-06-02
|
4KB
|
141 lines
#---------------------------------------------------------------------------
#
# Copyright (c) 1993-1995 by Cadre Technologies Inc.
#
# This software is furnished under a license and may be used only in
# accordance with the terms of such license and with the inclusion of
# the above copyright notice. This software or any other copies thereof
# may not be provided or otherwise made available to any other person.
# No title to and ownership of the software is hereby transferred.
#
# The information in this software is subject to change without notice
# and should not be construed as a commitment by Cadre Technologies Inc.
#
#---------------------------------------------------------------------------
#
# File : @(#)maketmpl /main/hindenburg/1
# Original date : 3-1993
# Description : OMT/GEN generic makefile template
#
#---------------------------------------------------------------------------
#
# @(#)maketmpl /main/hindenburg/1 2 Jun 1997 Copyright 1993-1995 Cadre Technologies
#
#---------------------------------------------------------------------------
SHELL=/bin/sh
.SUFFIXES:
.SUFFIXES: .~$OBJ_EXT .cxx .ec .l .lxx .y .yxx
INCS = -I~[location [m4_var get M4_home] include] ~[if {[file exists [location .. .. include]] && [file type [location .. .. include]] == "directory"} {$current_section append "-I[location .. .. include]"}]
CLASSLIB = ~[path_name concat [location [m4_var get M4_home] lib] libwmt4omt.$LIB_EXT]
DEBUGFLAGS = -g
CXXFLAGS = $(DEBUGFLAGS) $(INCS) \
~[foreach sys [[$clientContext currentPhase] systemVersions] {$current_section append "-I[location .. [[$sys system] name]] "}]
LDFLAGS = -o $@
LEXXXFLAGS =
YACCXXFLAGS = -d
AR = ar ruv
CXX = CC
LD = $(CXX)
ESQLC =
ESQLCFLAGS =
LOCAL_LIB = $(CLASSLIB)
#
# G E N E R A L T A R G E T S
#
# (default:) make all executables and libraries
all: ~[mm_files executable] ~[mm_files library]
# make all targets
system: ~[mm_files]
# install all executables and libraries
install: ~[mm_files executable install_] ~[mm_files library install_]
# clean all
clean: ~[mm_files $TGT_TYPES clean_]
# clobber all
clobber: ~[mm_files $TGT_TYPES clobber_]
#
# T A R G E T T E M P L A T E D E F I N I T I O N S
#
#
# filetype "executable"
#
~[mm_foreach_target executable {
~[mm_obj_name] = ~[mm_dependencies - .$OBJ_EXT "\\\n\t"]
~[mm_tgt_path]: $(~[mm_obj_name]) ~[mm_dependencies library .$LIB_EXT]
$(LD) $(LDFLAGS) $(~[mm_obj_name]) ~[mm_dependencies library .$LIB_EXT] $(LOCAL_LIB) ~[if {[osIdentification] != "WIN"} {$current_section append "|| ($RMF_CMND ~[mm_tgt_path]; exit 1)"}]
install_~[mm_tgt_path]: ~[mm_tgt_path]
~$CP_CMND ~[mm_tgt_path] ~[mm_install_path $target]
clean_~[mm_tgt_path]:
~$RMF_CMND $(~[mm_obj_name])
clobber_~[mm_tgt_path]: clean_~[mm_tgt_path]
~$RMF_CMND ~[mm_tgt_path]
}]
#
# filetype "library"
#
~[mm_foreach_target library {
~[mm_obj_name] = ~[mm_dependencies - .$OBJ_EXT "\\\n\t"]
~[mm_tgt_path]: $(~[mm_obj_name])
$(AR) ~[mm_tgt_path] $(~[mm_obj_name])
~[mm_process_lib [mm_tgt_path]]
install_~[mm_tgt_path]: ~[mm_tgt_path]
~$CP_CMND ~[mm_tgt_path] ~[mm_install_path $target]
~[mm_process_lib [mm_install_path $target]]
clean_~[mm_tgt_path]:
~$RMF_CMND $(~[mm_obj_name])
clobber_~[mm_tgt_path]: clean_~[mm_tgt_path]
~$RMF_CMND ~[mm_tgt_path]
}]
#
# R U L E S
#
.cxx.~$OBJ_EXT:
$(CXX) $(CXXFLAGS) -c $<
.ec.~$OBJ_EXT:
$(ESQLC) $(ESQLCFLAGS) $< ~[if {[osIdentification] != "WIN"} {$current_section append "|| ($RMF_CMND $*.c; exit 1)"}]
~$MV_CMND $*.c $*.cxx
$(CXX) $(CXXFLAGS) -c $*.cxx ~[if {[osIdentification] != "WIN"} {$current_section append "|| ($RMF_CMND $*.cxx; exit 1)"}]
~$RMF_CMND $*.cxx
.yxx.~$OBJ_EXT:
yacc++ $(YACCXXFLAGS) $<
~$MV_CMND y.tab.c $*.cxx
$(CXX) $(CXXFLAGS) -c $*.cxx
.lxx.~$OBJ_EXT:
lex++ $(LEXXXFLAGS) $<
~$MV_CMND lex.yy.c $*.cxx
$(CXX) $(CXXFLAGS) -c $*.cxx
depend:
mkdep -c "ccminm $(CXX) -E $(CXXFLAGS)" *.scxx *.cxx > depend.h
#
# D E P E N D E N C I E S
#
~[mm_all_deps]