1
# This Makefile requires GNU make (gmake).
5
# change this if you want to install it in a different place
6
ifndef $(TCM_INSTALL_DIR)
7
TCM_INSTALL_DIR=/opt/tcm
10
# the current version.
13
# just a guess (flags should indicate recursiveness, permission
14
# keeping and links should stay links).
15
TCM_INSTALL_CMD = /bin/cp -fpr
18
ifndef TCM_INSTALL_LIB
19
TCM_INSTALL_LIB=$(TCM_INSTALL_DIR)/lib/
23
CONFIG_INSTALL=$(TCM_INSTALL_LIB)
26
ifndef TCM_INSTALL_DOC
27
TCM_INSTALL_DOC=$(TCM_INSTALL_DIR)/doc/
30
ifndef TCM_INSTALL_SHARE
31
TCM_INSTALL_SHARE=$(TCM_INSTALL_LIB)
34
ifndef TCM_INSTALL_MAN
35
TCM_INSTALL_MAN=$(TCM_INSTALL_DIR)/man/
38
MFLAGS += TCM_INSTALL_DIR='$(TCM_INSTALL_DIR)' TCM_INSTALL_LIB='$(TCM_INSTALL_LIB)' CONFIG_INSTALL='$(CONFIG_INSTALL)' TCM_INSTALL_DOC='$(TCM_INSTALL_DOC)' TCM_COMPILER='$(TCM_COMPILER)' TCM_INSTALL_CMD='$(TCM_INSTALL_CMD)' TCM_HOME='$(TCM_COMPILE_DIR)' TCM_INSTALL_SHARE='$(TCM_INSTALL_SHARE)'
40
UNAME=$(shell uname -s | sed -e 's/_NT.*//g')
42
ifeq ($(UNAME),IRIX64)
53
TCM_INSTALL_CMD = /bin/cp -af
68
ifeq ($(UNAME),FreeBSD)
69
TCM_PLATFORM = freebsd
71
TCM_INSTALL_CMD = /bin/cp -Rp
74
TCM_PLATFORM = solaris
76
TCM_INSTALL_CMD = /usr/bin/cp -fpr
77
# TCM_PLATFORM = solaris.gcc
80
ifeq ($(UNAME),CYGWIN)
83
TCM_INSTALL_CMD = /bin/cp -dRf
86
TCM_COMPILE_DIR=$(shell pwd)
87
TCM_HOME=$(TCM_COMPILE_DIR)
88
SUBDIRS = bin lib src doc
91
@echo making $@ for $(TCM_PLATFORM)...
92
(cd ./src; rm -f ./Config.tmpl)
93
(cd ./src; ln -s Config.tmpl_$(TCM_PLATFORM) Config.tmpl)
94
(cd ./src; rm -f ./Makefile)
95
(cd ./src; ln -s Makefile.$(TCM_COMPILER) Makefile)
96
(cd ./src; touch ./gl/instances.h)
97
(cd ./lib/help; ln -s ../../CHANGELOG .)
98
(cd ./lib/help; ln -s ../../COPYING .)
99
@echo done making $@ for $(TCM_PLATFORM)
100
@echo PLEASE CHECK FIRST THE SETTINGS IN src/Config.tmpl!
101
@echo after that you can do the following:
102
@echo make depend: for making file dependencies
103
@echo make execs: for making the binaries
104
@echo make install: for copying the binaries and the files\
105
that they need to $(TCM_INSTALL_DIR)
106
@echo \(this installation directory can be changed in $(TCM_HOME)/Makefile\)
107
@echo make all: to do all this in one run
108
@echo make clean: to remove all binaries, object and temporary files.
110
all: config depend execs install
113
(cd ./src; ${MAKE} $(MFLAGS) all)
116
(cd ./doc; ${MAKE} TCM_VERSION='$(TCM_VERSION)' all)
119
(cd ./src; ${MAKE} TCM_HOME='$(TCM_COMPILE_DIR)' depend)
122
(cd ./src; ${MAKE} TCM_HOME='$(TCM_COMPILE_DIR)' undepend)
126
for dir in $(SUBDIRS); do \
127
(cd $${dir}; ${MAKE} TCM_HOME='$(TCM_COMPILE_DIR)' $@); done
128
@echo done making $@...
132
if test ! -d $(TCM_INSTALL_DIR); then\
133
mkdir -p $(TCM_INSTALL_DIR);\
134
$(CHMOD) 755 $(TCM_INSTALL_DIR); fi
135
$(TCM_INSTALL_CMD) README CHANGELOG COPYING FILEMAP \
136
INSTALL_ README.cygwin INSTALL.cygwin man $(TCM_INSTALL_DIR)
137
if test ! -d $(TCM_INSTALL_MAN); then\
138
mkdir -p $(TCM_INSTALL_MAN);\
139
$(CHMOD) 755 $(TCM_INSTALL_MAN); fi
140
$(TCM_INSTALL_CMD) man/* $(TCM_INSTALL_MAN)
141
for dir in $(SUBDIRS); do \
142
(cd $${dir}; ${MAKE} $(MFLAGS) $@); done
143
@echo done making $@...
145
-include $(TCM_HOME)/src/Config.tmpl