1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298
|
# -*- Makefile -*-
# Makefile.in
# $Id: Makefile.in,v 1.24 1998/10/21 22:00:32 elf Exp $
#
# written by Marc Singer
# 11 Octiber 1997
#
# This file is part of the project Buici. See the file README for
# more information.
#
# Copyright (C) 1997 Marc Singer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# in a file called COPYING along with this program; if not, write to
# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
# 02139, USA.
#
#
.PHONY: install clean all version revision patch
#
# --- Project specification
#
TARGET=buici-clock
PACKAGE=buici-clock
O_D=o/
SRC= \
main.cxx options.cxx version.cxx \
clock.cxx signal.cxx
# system.cxx video.cxx timebase.cxx renderx.cxx
# lfile.cxx lstream.cxx lring.cxx lthread.cxx thread.s
# report.cxx stats.cxx
# dct.cxx
__OBJ=$(SRC:.c=.o)
_OBJ=$(__OBJ:.cxx=.o)
OBJ=$(_OBJ:.s=.o)
VERSION_HEADER=version.h
RELEASE_PATH=${HOME}/release
XO_PATH=@XO_PATH@
CC=@CXX@
CFLAGS_I=-I${XO_PATH}
CFLAGS=@CFLAGS@
#CFLAGS=$(CFLAGS) -O
#CFLAGS=$(CFLAGS) -O2
#CFLAGS=$(CFLAGS) -fomit-frame-pointer
#CFLAGS=$(CFLAGS) -pg
CFLAGS_=-g $(CFLAGS_I)@CFLAGS_W@@X_CFLAGS@
LFLAGS=-g @LDFLAGS@@X_LIBS@ -L${XO_PATH}@X_PRE_LIBS@ @LIBS@ -lxo -lX11 -lXext@X_EXTRA_LIBS@
#LFLAGS=-pg ${LFLAGS}
DEPEND=depend.m
ECHO=@/bin/echo
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
#
# --- Autoconf generated symbols
#
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
docdir = $(prefix)/doc/$(PACKAGE)
infodir = @infodir@
mandir = @mandir@
# This is removed because it generates a line in the Makefile.in that
# breaks the use of 'make -f Makefile.in distclean' from
# debian/rules. We do call make on subdirectories, so this may be a
# problem.
# @SET_MAKE@
#
# --- Implicit rules
#
vpath %.o $(O_D)
%.o: %.cxx
$(make_o)
$(ECHO) $(CC) -c $(CFLAGS) -o $(O_D)$@ $<
@$(CC) -c $(CFLAGS) $(CFLAGS_) -o $(O_D)$@ $<
$(O_D)%.o: %.cxx
$(make_o)
$(ECHO) $(CC) -c $(CFLAGS) -o $@ $<
@$(CC) -c $(CFLAGS) $(CFLAGS_) -o $@ $<
%.o: %.s
$(make_o)
$(ECHO) $(AS) $(AFLAGS) -o $(O_D)$@ $<
@$(AS) $(AFLAGS) $(AFLAGS_) -o $(O_D)$@ $<
$(O_D)%.o: %.s
$(make_o)
$(ECHO) $(AS) $(AFLAGS) -o $@ $<
@$(AS) $(AFLAGS) $(AFLAGS_) -o $@ $<
%.i: %.cxx
$(CC) -c $(CFLAGS) $(CFLAGS_) -E -o $(notdir $@) $<
%.s: %.cxx
$(CC) -c $(CFLAGS) $(CFLAGS_) -S -o $@ $<
%.s: %.c
$(CC) -c $(CFLAGS) $(CFLAGS_) -S -o $@ $<
#
# --- Primary targets
#
all: check_depend make_o _version.h xolib $(O_D)$(TARGET) $(TARGET)
.PHONY: make_o
make_o:
@if test ! -e $(O_D) ;\
then echo === Creating \'$(O_D)\' output directory ; mkdir $(O_D) ; fi
xolib:
@if test ! "${XO_PATH}" = "../xo" ; \
then (cd ${XO_PATH} ; configure ; make all) ; fi
$(O_D)$(TARGET): $(OBJ) $(XO_PATH)/libxo.a
$(CC) -o $@ $(addprefix $(O_D),$(OBJ)) $(LFLAGS)
$(TARGET): $(O_D)$(TARGET)
@echo -- Linking $(TARGET) to $(O_D)$(TARGET)
@ln -s $(O_D)$(TARGET) .
#install:
# cp $(TARGET).exe c:/usr/local
clean:
ifneq "$(O_D)" ""
-rm -rf $(O_D)
else
-rm $(OBJ)
endif
-rm *.i
.PHONY: dist_clean
dist_clean:
@-rm -f \#* *~ *.sed *.i *.cod
#
# --- Version and Build Engineering
#
.version: .version_major .version_minor .version_patch
@/bin/echo -n `cat .version_major`.`cat .version_minor`.`cat \
.version_patch` > .version
_version.h: .version
@/bin/echo -e \#define SZ_VERSION \"`cat .version`\" > _version.h
.PHONY: transmit
transmit: # distribution-archive
@/bin/sh -c "cd .. ;\
distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.tar.gz"
@distftp.sh ${PACKAGE} ANNOUNCEMENT
@distftp.sh ${PACKAGE} README
@distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.lsm
version.sed: _version.h
@echo Creating version-specific sed script...
@/bin/echo s/\<\<version\>\>/`cat .version`/ > version.sed
@/bin/echo s/\<\<date\>\>/`date +"%d %B %Y"`/ >> version.sed
@/bin/echo s/\<\<tar-file\>\>/${PACKAGE}-`cat .version`.tar.gz/ \
>> version.sed
@/bin/echo s/\<\<lsm-file\>\>/${PACKAGE}-`cat .version`.lsm/ >> version.sed
.PHONY: ${PACKAGE}.lsm
${PACKAGE}.lsm: version.sed LSM
@echo Creating LSM file...
@if test -f *.lsm ; then rm *.lsm ; fi
@sed -f version.sed LSM > ${PACKAGE}-`cat .version`.lsm
.PHONY: ${PACKAGE}.ANNOUNCEMENT
${PACKAGE}.ANNOUNCEMENT: version.sed ANNOUNCEMENT
@echo Creating ANNOUNCEMENT file...
@if test -f *.ANNOUNCEMENT ; then rm *.ANNOUNCEMENT ; fi
@sed -f version.sed ANNOUNCEMENT \
> ${PACKAGE}-`cat .version`.ANNOUNCEMENT
@cat ${PACKAGE}-`cat .version`.lsm \
>> ${PACKAGE}-`cat .version`.ANNOUNCEMENT
.PHONY: ${PACKAGE}.README
${PACKAGE}.README: version.sed README
@echo Creating README file...
@if test -f *.README ; then rm *.README ; fi
@sed -f version.sed README > ${PACKAGE}-`cat .version`.README
.PHONY: distribution-archive da
distribution-archive da: ${PACKAGE}.lsm ${PACKAGE}.ANNOUNCEMENT ${PACKAGE}.README dist_clean
@echo Creating distribution archive...
@/bin/sh -c "if test -x ../${PACKAGE}-`cat .version`;\
then rm ../${PACKAGE}-`cat .version` ; fi"
@ln -s ${PACKAGE} ../${PACKAGE}-`cat .version`
@find . -path CVS -prune\
-o -path o -prune\
-o -regex .\*/${PACKAGE} -prune\
-o -regex .\*/configure -prune\
-o -regex .\*/config.status -prune\
-o -regex .\*\.o -prune\
-o -type f -exec chmod 644 \{\} \;
@/bin/sh -c 'cd .. ; V=`cat ${PACKAGE}/.version` ;\
tar zcf ${PACKAGE}-$$V.tar.gz\
`find ${PACKAGE}-$$V/\
-regex .\*/CVS -prune\
-o -regex .\*~ -prune\
-o -regex .\*/o -prune\
-o -regex .\*\\\\.o -prune\
-o -regex .\*\\\\.a -prune\
-o -regex .\*\\\\.m -prune\
-o -regex .\*\\\\.bmp -prune\
-o -regex .\*/${PACKAGE} -prune\
-o -regex .\*/Makefile -prune\
-o -regex .\*/config.cache -prune\
-o -regex .\*/config.h -prune\
-o -regex .\*/config.log -prune\
-o -regex .\*/config.status -prune\
-o -regex .\*/configure.scan -prune\
-o -regex .\*/log -prune\
-o -regex .\*/gmon.out -prune\
-o -regex .\*/\.cvsignore -prune\
-o -regex .\*/\.gdbinit -prune\
-o -regex .\*/NOTES -prune\
-o -regex .\*/patches -prune\
-o -regex .\*/buici-.\* -prune\
-o -type f -print | sort`'
@-rm ../${PACKAGE}-`cat .version`
@echo Moving distribution file to ${RELEASE_PATH}...
@mv ../${PACKAGE}-`cat .version`.tar.gz ${RELEASE_PATH}
@mv ${PACKAGE}-`cat .version`.* ${RELEASE_PATH}
#
# --- Installation
#
.PHONY: install installdirs
install: installdirs $(TARGET)
# hello.info
$(INSTALL_PROGRAM) $(TARGET) $(bindir)/$(binprefix)
strip $(bindir)/$(binprefix)/$(TARGET)
# -$(INSTALL_DATA) options $(docdir)
$(INSTALL_DATA) $(TARGET).1 $(mandir)/man1
# $(INSTALL_DATA) curves.5 $(mandir)/man5
installdirs:
$(srcdir)/mkinstalldirs $(bindir) $(mandir)/man1
#$(docdir)
#$(mandir)/man5
#$(infodir)
#
# --- Dependencies: depend.m
#
.PHONY: depend check_depend
# *** removed _version.h to prevent forced dependency build
depend: $(DEPEND) # _version.h
$(DEPEND) depend: # _version.h $(SRC)
$(CC) $(CFLAGS_I) -M $(SRC) > $(DEPEND)
check_depend:
@if test ! -s ${DEPEND} ; then \
echo "-- Use 'make depend' to create dependencies file." \
" Continuing without it." ; fi
#
# --- Include dependencies always. Configure creates an empty file
#
ifneq "$(wildcard depend.m)" ""
include ${DEPEND}
endif
|