home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
DT
/
DT023A.ZIP
/
INC-DOCS.LZH
/
APPNOTES.LZH
/
MAKE.APP
/
MK.TPL
< prev
Wrap
Text File
|
1990-03-06
|
5KB
|
155 lines
# makefile for :
# Version : 1.0
# Date :
# Author :
# Depends on :
# Copyright 1990 <your outfit>; all rights reserved
###########################################################################
# This section describes the environment in which package is to be made
###########################################################################
MODEL = L
EXEC_DIR = c:\local
LIB_DIR = c:\lib
INCL_DIR = c:\include
DOC_DIR = c:\docs
ARCHIVER = pkarc u
SRC_PRINT = do4print
DOCUMENTER = hrrdoc
LIBRARIES =
###########################################################################
# This section describes the contents of the package
###########################################################################
# The following are source objects
PKG_NAME =
INCLUDE =
SOURCES =
MAKEFILE =
TEST_SRC =
# The following are derived objects creatable by this makefile
OBJECTS =
EXEC =
DOCUMENT =
LIBRARY =
# example: LIBRARY = hrrutil$(MODEL).lib
TEST_OBJ =
TEST_EXEC = $(EXEC)
###########################################################################
# The next section controls compilation and linking
###########################################################################
ASM_FLAGS = -ml -c -l -t -z
TEST_ASM_FLAGS =
C_FLAGS = -c -Ox -G0 -A$(MODEL) -Fc -D LINT_ARGS
TEST_C_FLAGS = -c -Od -G0 -A$(MODEL) -Fc -Zi -D LINT_ARGS
LINK_FLAGS = /CO /NOI
.SUFFIXES .obj .c .asm
.c.obj :
cl $(TEST_C_FLAGS) $*.c
.asm.obj :
masm $(ASM_FLAGS) $*;
###########################################################################
# The next section contains standard targets required by RIS policy
###########################################################################
# The following (default) target should create the entire package
all : $(EXEC) $(OBJECTS) $(LIBRARY) $(DOCUMENT) $(TEST_EXEC)
# The following target should create an archive containing all sources
archive :
$(ARCHIVER) $(PKG_NAME) $(INCLUDE) $(SOURCES) $(MAKEFILE) $(TEST_SRC)
# The following target should delete everything automatically creatable
# NOTE: make sure it isn't deleting anything important!
cleanup :
del *.bak
del *.cod
del *.crf
del *.exe
del *.lst
del *.map
del *.obj
del *.xrf
del $(DOCUMENT)
del $(LIBRARY)
# The following target should invoke codeview on test or main program
# NOTE: assumes use of TEST_C_FLAGS, above
debug : $(OBJECTS) $(LIBRARY) $(DOCUMENT) $(TEST_EXEC)
cv /w /s /m /cGmain /43 $(TEST_EXEC)
# The following target should install this package in the local environment
# NOTE: comment out or remove any that don't apply
install : $(EXEC) $(LIBRARY) $(DOCUMENT)
# copy $(EXEC) $(EXEC_DIR)
# copy $(LIBRARY) $(LIB_DIR)
# copy $(INCLUDE) $(INCL_DIR)
# copy $(DOCUMENT) $(DOC_DIR)
# The following target should print the generated documentation
print : $(DOCUMENT)
$(SRC_PRINT) $(DOCUMENT)
# The following target should print the source
printsrc :
$(SRC_PRINT) $(INCLUDE) $(SOURCES)
# The following target should execute the test program
# This forces creation of everything, since it is often used to make package
test : $(EXEC) $(OBJECTS) $(LIBRARY) $(DOCUMENT) $(TEST_EXEC)
$(TEST_EXEC)
# The following target should remove the package from the local environment
# NOTE: comment out or remove any that don't apply
uninstall :
# del $(EXEC_DIR)\$(EXEC)
# del $(LIB_DIR)\$(LIBRARY)
# del $(INCL_DIR)\$(INCLUDE)
# del $(DOC_DIR)\$(DOCUMENT)
###########################################################################
# The remainder of the makefile concerns dependencies and creation
# instructions for the particular components of the package. This
# section ALWAYS requires hand-crafting.
###########################################################################
# Compile and link the executable program
#$(EXEC) : $(OBJECTS) $(LIBRARY)
# link $(OBJECTS), $(EXEC), $(PKG_NAME).map, .\$(LIBRARY) \
# $(LIBRARIES) $(LINK_FLAGS)
# Make the library
#$(LIBRARY) : $(OBJECTS)
# lib $(LIBRARY) -+ obj1;
# lib $(LIBRARY) -+ obj2;
# lib $(LIBRARY) -+ objlast, $(PKG_NAME).xrf;
# Create a document from the source files
# if you change how this document is constructed, check cleanup target
$(DOCUMENT) : $(INCLUDE) $(SOURCES)
$(DOCUMENTER) < $(INCLUDE) > $(DOCUMENT)
$(DOCUMENTER) < source1.c >> $(DOCUMENT)
$(DOCUMENTER) < source2.c >> $(DOCUMENT)
# Compile the test program for the library
#$(TEST_EXEC) : $(TEST_OBJ) $(LIBRARY)
# link $(TEST_OBJ), $(TEST_EXEC), $(PKG_NAME).map, .\$(LIBRARY) \
# $(LIBRARIES) $(LINK_FLAGS)
# The following are predecessors of the object modules in this package
#test.obj : sample.h test.c
#obj1.obj : sample.h obj1.c
###########################################################################
# PROBLEMS WITH THIS MAKEFILE TEMPLATE
###########################################################################
# Need serious solution to library make (use touch trick)