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 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683
|
## ACGM: all configurations that were in this "Makefile"
## in the old version of xmorph are now in "Makefile.conf" in the main dir
## and there we discuss what has been changed
## this file is now unused and unusable
## (Makefiles are automatically generated by automake)
# Makefile for xmorph and tkmorph
#
# Written and Copyright (C) 1994-2000 by Michael J. Gourlay
#
# This file is part of Xmorph.
#
# Xmorph 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, or (at your option)
# any later version.
#
# Xmorph 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
# along with Xmorph; see the file LICENSE. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# Xmorph is part of GNU software.
#
#
#
# INSTRUCTIONS FOR COMPILING XMORPH:
#
#
# 0) Read the README file. Then read this Makefile.
#
#
# 1) Make a backup copy of this Makefile.
#
#
# 2) Edit each of the variables in this Makefile before the "SRCS="
# statement. Each variable has instructions for how to assign
# the variable values for various kinds of systems.
#
#
# 3) Some operating systems have a problem with long tokens, so the
# help strings in help_menu.c will have to be trimmed if you get warnings
# about long strings from your C compiler. See the comments in
# help_menu.c for details. Most compilers will not have problem with
# this.
#
#
# 4) On Unix machines, from your shell, type "make depend".
#
# If this fails or if you do not have makedepend, or if you are not
# running on a Unix machine, just delete all of the lines (if there
# are any) below the "depend:" rule near the end of this Makefile.
# Look for the rule that says "depend:" and read the comments that
# follow it. This step is not essential for building programs but it
# is useful for development and debugging.
#
# Another alternative is to use "make cleandepend", espeially
# if you are generating a Makefile for cross-compiling. the
# cleandepend target will only generate dependency rules for
# header files specific to xmorph, not for all header files.
#
#
# 5) From the shell or command prompt, type "make".
#
#
# 6) If there are any errors or compiler complaints, find out why and
# fix them :). Then send email to the author explaining the cause of
# the problem, and its solution. If it is a big deal, I will put your
# name in lights for the next release. See the README file for
# the internet email address of the author.
#
# But seriously folks, if you can not figure out the problem, send
# the author email. Before complaining, though, read the man
# pages for your C compiler and your linker. If you are using
# static linking and you get a linker problem, try dynamic
# libraries, and vice versa.
#
# If all goes well, there will be an executable called "xmorph".
#
#
# 7) From the shell, type "xmorph".
#
# There are help pages accessible from within xmorph. If there
# are any bugs or spelling errors, fix them and/or report them to the
# author. See the README file for an email address.
#
#
# 8) To install xmorph on your system, edit INSTALL_BASE in this file
# and type "make install" as root. If that fails, place the
# "xmorph" executable in the standard place on your machine for such
# things. There is also an "xmorph.man" file which should be
# renamed to xmorph.1 and placed in the appropriate directory for
# manual pages of optional programs. For most systems, this is
# /usr/local/man/man1.
## SHELL: Interpretter for executing "make" commands
## -------------------------------------------------
#
# The shell should be Bourne compatible.
# Do not change unless you do not have "/bin/sh".
#
SHELL=/bin/sh
## CC: C compiler
## --------------
#
# You must use an ANSI C compiler.
#
# Apollo w/ Domain/OS, BSD: use /bin/cc
#
#CC=ucbcc
#CC=apcc
#CC=gcc
#CC=/bin/cc
#CC=cc
CC=cc
## INCLUDE: C compiler options to append header file paths
## -------------------------------------------------------
#
# Set INCLUDE to refer to the places where your header files reside.
#
# This should refer to where your TCL and Tk headers are.
#
# If you are building the GIMP plugin version, this should also refer
# to where your GIMP header files are installed.
#
# Solaris: On some Solaris machines, linking with the openwin libraries
# REQUIRES including the openwin headers (not MIT headers!).
# You should then set INCLUDE to have -I/usr/openwin/include
#
#INCLUDE=-I/usr/local/include -I/usr/openwin/include
INCLUDE=-I/usr/local/include
## DEBUG: C compiler options for debugging and/or code optimization
## ----------------------------------------------------------------
#
# For Unix compilers,
# -O usually means "optimize"
# -g usually means "debug"
#
# On most compilers, optimization and debugging flags are mutually
# exclusive. A notable exception is the GNU C compiler, which can
# have both debugging and optimization.
#
#
# SGI native compiler:
# -fullwarn gives more comprehensive warning messages.
# -wlint does a lint check.
#
# Be aware that the N32 C compiler for IRIX 6.2, using -fullwarn
# will generate stupid warnings about the X include files. This is
# the SGI compiler complaining about SGI C code. Think about it.
#
#
# GCC:
# -Wall gives more comprehensive warning messages.
#
#
# -DVERBOSE and -DDEBUG are used for development.
# Unless you are working on the code, you will want to omit these.
#
#DEBUG=-O -g -Wall -DVERBOSE -DDEBUG
#DEBUG=-O
#DEBUG=-g3 -O -fullwarn -DVERBOSE -DDEBUG
DEBUG=-g3 -O -fullwarn
## NOWARN: C compiler options to reduce the number of warnings
## -----------------------------------------------------------
#
# The code generated by SWIG is not lint-clean but it does not matter
# so we want to ignore those warnings.
NOWARN=
#NOWARN=-woff 1164,1174,1209,1233,1498,1552
## DEFINES: C precompiler macros
## -----------------------------
#
# GIMP: Adds GIMP plugin functionality to xmorph.
# Also define NEED_GIMP=1. If this is defined, then you may run
# xmorph both as a standalone application, and by adding it to your
# ~/.gimp/plug-ins directory (usually via a symlink). From what I
# understand, this will not work for tkmorph. See GIMPLIBS, below.
#
# REAL: Size of a "REAL" used by spline code.
# Correct value is "double". Do not change.
#
# RGBA_MESH_WARP: flag to tell RgbaImage to include mesh-based warping
# methods. Do not change.
#
# RGBA_TK: flag to tell RgbaImage to include Tk Photo image code.
# DO NOT DEFINE for xmorph. Only define for tkmorph.
# Also change the "all" target if RGBA_TK is changed.
#
# RED_GREEN_COLOR_BLIND: uses blue instead of red for color of
# 'destination' mesh lines and points.
#
# STRDUP_PROTO_BROKEN: For some versions of GNU C, the string.h
# header file has an incorrect prototype for strdup. If you
# experience problems compiling, related to the strdup prototype,
# then define STRDUP_PROTO_BROKEN.
# For tkmorph:
#DEFINES=-DREAL=double -DRGBA_MESH_WARP -DRGBA_TK
# For colorblind:
#DEFINES=-DREAL=double -DRGBA_MESH_WARP -DRED_GREEN_COLOR_BLIND
# For GIMP plugin:
#DEFINES=-DREAL=double -DRGBA_MESH_WARP -DGIMP -DNEED_GIMP=1
# Broken GNU C:
#DEFINES=-DREAL=double -DRGBA_MESH_WARP -DSTRDUP_PROTO_BROKEN
# Most systems:
DEFINES=-DREAL=double -DRGBA_MESH_WARP
## XLIBS: X libraries
## ------------------
#
# Must have the X libraries: X11, MIT Athena Widgets, X Toolkit, X Misc Utils
#
# Linux 2.0: must have /usr/X11/lib
# or /usr/X11R6/lib explicitly in library search path
#
# SunOS (pre-Solaris): Might have to use static X libraries because
# dynamic X libraries are incomplete.
#
# Solaris: To link to openwin libraries, add -L/usr/openwin/lib
#
# IRIX6.2: Need to have -lcvt after -lXt
# If you receive an error about an unresolved symbol named
# SgCvtCreateConversionContext, you need to include -lcvt.
# The cvt library is available in the goldengate.sw.goldengate package
# Sun Solaris:
#XLIBS=-L/usr/openwin/lib -lXaw -lXmu -lXext -lXt -lX11
# Linux:
#XLIBS=-L/usr/X11/lib -lXaw -lXmu -lXext -lXt -lX11
#XLIBS=-L/usr/X11R6/lib -lXaw -lXmu -lXext -lXt -lX11
# SGI IRIX:
XLIBS= -lXaw -lXmu -lXext -lXt -lcvt -lX11
## GIMPLIBS: GIMP libraries
## ------------------------
# If you have defined -DGIMP in the DEFINES section, then xmorph will
# be built to run both as a standalone application and as a GIMP
# plugin. Here, you need to specify the appropriate GIMP libraries.
#
# Comment out this variable if you have not used -DGIMP.
#GIMPLIBS=-L/usr/local/lib -lgimp -lglib
#GIMPLIBS=-lgimp -lglib
## NON_GUI_LIBS: libraries which are not part of the GUI
## -----------------------------------------------------
#
# Must have the math library (-lm).
#
#
# Linux: Add -ldl if you get link error regarding dlerror, dlopen, or
# dlsym
#
#
# FreeBSD: Do not use static libraries, because for some reason they
# do not work.
#
#
# SunOS: Use the /usr/lib/debug/malloc.o module if you want to do
# memory checking.
# Also see the CFLAGS comments about memory checking under SunOS.
#
#
# SGI IRIX: Use -lmalloc to link with their special memory allocation
# routines. If you get an error about mallopt being
# unresolved, then you will have to link with the libmalloc
# shared object. Do this by specifying -lmalloc here.
#
# -lmalloc_cv has more robust memory checking
#NON_GUI_LIBS = -lm
#NON_GUI_LIBS = -lm -ldl
#NON_GUI_LIBS = -lm /usr/lib/debug/malloc.o
NON_GUI_LIBS = -lm -lmalloc
## LIBS: loader options to link with libraries
## -------------------------------------------
#
# Read the man page for your linker before sending me email about
# problems.
#
# Apollo w/ Domain/OS, BSD: omit XLIBS
#LIBS = $(GIMPLIBS) $(NON_GUI_LIBS)
LIBS = $(GIMPLIBS) $(XLIBS) $(NON_GUI_LIBS)
# SHLIB_FLAG: flag used to generate shared library
# ------------------------------------------------
SHLIB_FLAG=-shared
# SHLIB_EXT: filename extension for shared libraries
# --------------------------------------------------
SHLIB_EXT=so
## LDFLAGS: Loader options
## -----------------------
#
LDFLAGS=-L/usr/local/lib
## CFLAGS: Miscellaneous C compiler options
## ----------------------------------------
#
# Read the man page for your C compiler before sending me email about
# problems.
#
# SunOS: Add the option -DSUNOS version if you want to do memory checking.
# -- Also see LIBS for another flag relating to memory checking.
#
# HPUX 7.0B: native C compiler needs more symbol table space: +Ns4000
#
# Apollo w/ Domain/OS, BSD: use the -inlib line (contributed by Paul Walker)
#
#CFLAGS=$(DEBUG) $(DEFINES) +Ns4000
#CFLAGS=-O -W0,-inlib,/lib/x11lib.r5 -W0,-inlib,/lib/xawlib.r5 -W0,-inlib,/lib/xextlib.r5 -W0,-inlib,/lib/xtlib.r5 -W0,-inlib,/lib/xmulib.r5
#CFLAGS=$(DEBUG) $(DEFINES) $(INCLUDE) -DSUNOS
CFLAGS=$(DEBUG) $(DEFINES) $(INCLUDE)
## INSTALL_BASE: Directory base to install files
## ---------------------------------------------
INSTALL_BASE=/usr/local
#### ======================================================
#### ======================================================
####
#### Nothing to edit below here
#### (except maybe the makedepend dependencies near the end of this
#### file if you do not have "makedepend")
####
#### ======================================================
#### ======================================================
SRCS=\
diw_map.c \
file_menu.c \
help_menu.c \
image_cb.c \
image_diw.c \
mesh.c \
mesh_cb.c \
mesh_menu.c \
mjg_dialog.c \
my_malloc.c \
RgbaImage.c \
sequence.c \
spline.c \
spl-array.c \
tga.c \
warp.c \
warp_menu.c \
xmorph.c
LIB_OBJS= \
mesh.o \
my_malloc.o \
RgbaImage.o \
spl-array.o \
spline.o \
tga.o \
warp.o
GUI_OBJS=\
diw_map.o \
file_menu.o \
help_menu.o \
image_cb.o \
image_diw.o \
mesh_cb.o \
mesh_menu.o \
mjg_dialog.o \
sequence.o \
warp_menu.o \
xmorph.o
#all: morph.$(SHLIB_EXT)
all: xmorph morph xmorph.man xmorph.info
libmorph.a: $(LIB_OBJS)
ar cr $@ $(LIB_OBJS)
libmorph.$(SHLIB_EXT): $(LIB_OBJS)
ld $(SHLIB_FLAG) $(LDFLAGS) $(LIB_OBJS) -o $@
xmorph: main-x.o libmorph.a $(GUI_OBJS)
@echo ""
@echo ""
@echo ""
@echo ""
@echo "==== If the next command generates link errors regarding"
@echo "==== unresolved symbols to Tk routines, then you probably"
@echo "==== erroneously defined RGBA_TK and you should change"
@echo "==== the Makefile."
@echo ""
@echo ""
@echo ""
@echo ""
$(CC) $(CFLAGS) -o $@ main-x.o $(GUI_OBJS) libmorph.a $(LIBS)
morph: main-cl.o libmorph.a
$(CC) $(CFLAGS) -o $@ main-cl.o libmorph.a $(NON_GUI_LIBS)
.c$(OBJ): $(SRCS) Makefile
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
main-x.o: main.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c -DX_GUI main.c -o $@
main-cl.o: main.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c main.c -o $@
xmorph.man: xmorph.1
nroff -man xmorph.1 > xmorph.man
col -b < xmorph.man > xmorph.txt
xmorph.info: xmorph.texinfo
makeinfo xmorph.texinfo
test-tga: tga.o test-tga.c
$(CC) $(CFLAGS) -o $@ test-tga.c tga.o
install: xmorph xmorph.man libmorph.a libmorph.$(SHLIB_EXT)
cp xmorph $(INSTALL_BASE)/bin
cp xmorph.1 $(INSTALL_BASE)/man/man1
cp libmorph.a $(INSTALL_BASE)/lib
cp libmorph.$(SHLIB_EXT) $(INSTALL_BASE)/lib
## Wrapper code for morph interpretter.
##
## This code is under construction and not yet ready for public use.
morph_wrap.c: morph.swig RgbaImage.h mesh.h
@echo ""
@echo ""
swig -tcl -o morph_wrap.c morph.swig
@echo ""
@echo ""
morph_wrap.o: morph_wrap.c
$(CC) -c $(CFLAGS) $(NOWARN) morph_wrap.c
morph.$(SHLIB_EXT): morph_wrap.o $(LIB_OBJS)
@echo ""
$(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_FLAG) morph_wrap.o $(LIB_OBJS) $(LIBS) -o $@
@echo ""
macros:
@echo ""
@echo ""
@echo "This will work for GNU C"
echo > empty.c
-cc -E -dM empty.c
rm empty.c
@echo ""
@echo ""
@echo "This will work for SGI"
-cc -E -show /dev/null
white:
@echo ""
@echo ""
@echo "These greps should produce no output except ignored errors"
@echo ""
@echo ""
-grep ' ' *.[ch]
-grep ' $$' *.[ch]
@echo ""
clean:
-rm -f main-x.o
-rm -f main-cl.o
-rm -f $(LIB_OBJS)
-rm -f $(GUI_OBJS)
-rm -f core
-rm -f test-tga
-rm -f morph_wrap.o
-rm -f morph_wrap.c
veryclean: clean
-rm -f morph
-rm -f xmorph
-rm -f xmorph.man
-rm -f xmorph.txt
-rm -f xmorph.info
-rm -f libmorph.a
-rm -f libmorph.$(SHLIB_EXT)
-rm -f morph.$(SHLIB_EXT)
-rm -f so_locations
-rm -f morph_wrap.doc
-rm -f morph_wrap.html
DIST=COPYLEFT \
FILES \
HISTORY \
LICENSE \
Makefile \
Makefile.orig \
gimp-README \
README \
SUMS \
xmorph.README \
xmorph.texinfo \
*.[ch] *.xbm tkmorph *.tk xmorph.1 warp.param *.swig
SUMS:
sum $(DIST) | sort -n > SUMS
BACKDIR=`date +%Y%b%d | tr '[A-Z]' '[a-z]'`
backup: SUMS white
@if [ -d backup ]; then echo "'backup' already exists" ; exit 1 ; fi
@if [ -d $(BACKDIR) ]; then echo "$(BACKDIR) already exists" ; exit 1 ; fi
mkdir $(BACKDIR)
cp -p Makefile Makefile.orig
cp -p README xmorph.README
ls -ltr > FILES
cp -p $(DIST) $(BACKDIR)
#tar cvf - $(DIST) | ( cd $(BACKDIR); tar xvf - )
DISTFILE=xmorph-$(BACKDIR).tar
dist: cleandepend backup
make morph_wrap.c
mv morph_wrap.c $(BACKDIR)
mv $(BACKDIR) xmorph-$(BACKDIR)
tar cvf $(DISTFILE) xmorph-$(BACKDIR)
gzip $(DISTFILE)
send: dist
rcp xmorph-$(BACKDIR).tar.gz ucsub:public_html/Software/Graphics
ctags:
-ctags *.[ch]
-ctags -t *.[ch]
unproto:
unprotoize $(SRCS)
grind:
for file in $(SRCS) *.h ; do tgrind -p $$file ; done
ctrace:
-mkdir trace
-for cfile in $(SRCS) ; do \
ctrace -P -t 20 $$cfile > trace/$$cfile ; \
done
cleandepend: ctags
makedepend -Y *.c
depend: ctags
makedepend $(INCLUDE) $(SRCS)
#### The lines which follow are automatically generated by
#### "makedepend" which is a program that automatically generates
#### dependency lists. If your system does not have "makedepend"
#### then you should delete the lines after the line that says
#### "DO NOT DELETE THIS LINE"
# DO NOT DELETE THIS LINE -- make depend depends on it.
RgbaImage.o: my_malloc.h tga.h RgbaImage.h
diw_map.o: my_malloc.h select.xbm unselect.xbm spline.h spl-array.h
diw_map.o: RgbaImage.h image_cb.h image_diw.h mesh.h mjg_dialog.h main.h
diw_map.o: diw_map.h
file_menu.o: xmorph.h mjg_dialog.h mesh_cb.h image_cb.h file_menu.h
help_menu.o: xmorph.h mjg_dialog.h help_menu.h
image_cb.o: diw_map.h mesh.h image_diw.h RgbaImage.h mjg_dialog.h main.h
image_cb.o: image_cb.h
image_diw.o: my_malloc.h diw_map.h mesh.h image_diw.h RgbaImage.h main.h
main.o: mesh.h RgbaImage.h main.h
mesh.o: my_malloc.h mesh.h
mesh_cb.o: diw_map.h mesh.h image_diw.h RgbaImage.h mjg_dialog.h mesh_cb.h
mesh_menu.o: mesh_cb.h mesh_menu.h
mjg_dialog.o: mjg_dialog.h my_malloc.h
my_malloc.o: my_malloc.h
sequence.o: diw_map.h mesh.h image_diw.h RgbaImage.h mjg_dialog.h warp.h
sequence.o: my_malloc.h main.h sequence.h
spl-array.o: my_malloc.h spline.h spl-array.h
spline.o: spline.h my_malloc.h
test-tga.o: tga.h RgbaImage.h
tga.o: my_malloc.h tga.h RgbaImage.h
warp-i.o: my_malloc.h warp.h
warp.o: my_malloc.h spline.h spl-array.h warp.h
warp_menu.o: mjg_dialog.h sequence.h diw_map.h mesh.h image_diw.h RgbaImage.h
warp_menu.o: warp_menu.h
xmorph.o: diw_map.h mesh.h image_diw.h RgbaImage.h sequence.h file_menu.h
xmorph.o: mesh_menu.h warp_menu.h help_menu.h my_malloc.h main.h xmorph.h
|