| 1 |
########################################################################### |
| 2 |
# This program is Copyright (C) 1991-1999 by C.H.Lindsey, University of # |
| 3 |
# Manchester. (X)JOVETOOL is provided to you without charge, and with no # |
| 4 |
# warranty. You may copy, modify, and/or distribute (X)JOVETOOL, # |
| 5 |
# provided that this notice is included in all the files, except insofar # |
| 6 |
# as a more specific copyright notices attaches to the file (x)jovetool.c # |
| 7 |
########################################################################### |
| 8 |
|
| 9 |
# Makefile for xjove (XView) and jovetool (SunView) |
| 10 |
# |
| 11 |
# This makefile may be invoked directly, or by the main JOVE Makefile. |
| 12 |
# A number of macros may need to be adjusted for any particular environment. |
| 13 |
# If the Makefile is invoked by the main JOVE Makefile, most |
| 14 |
# customization will be inherited from that Makefile automatically: |
| 15 |
# DEFINES, CC, OPTFLAGS, SYSDEFS, XINSTALL, BINDIR, and INSTALLFLAGS. |
| 16 |
# The remaining macros that may need attention are XJLDFLAGS and XJCFLAGS. |
| 17 |
# Under Solaris 2, make sure that your OPENWINHOME environment variable |
| 18 |
# is set. |
| 19 |
|
| 20 |
# Select optimization level (flags passed to compiling and linking steps). |
| 21 |
# On most systems, -g for debugging, -O for optimization. |
| 22 |
# On the official Sun ANSI C compiler and the standard System V Release 4 |
| 23 |
# compiler, adding -Xa -v will increase compiler checking. |
| 24 |
OPTFLAGS = -O |
| 25 |
|
| 26 |
# For SunView: |
| 27 |
# DEFINES=-DSUNVIEW |
| 28 |
DEFINES= |
| 29 |
|
| 30 |
# for Solaris 2.x: |
| 31 |
SYSDEFS=-DSYSVR4 |
| 32 |
# -i: ignore any LD_LIBRARY_PATH setting |
| 33 |
# -L<dir>: add <dir> to library search path |
| 34 |
# -R<dir[:dir]>: specify library search directories to dynamic linker |
| 35 |
XJLDFLAGS= -i -L$$OPENWINHOME/lib -R$$OPENWINHOME/lib |
| 36 |
|
| 37 |
# for Sun0s4.x: |
| 38 |
# XJLDFLAGS=-L$$OPENWINHOME/lib |
| 39 |
# SYSDEFS=-DSUNOS41 |
| 40 |
|
| 41 |
CFLAGS = $(OPTFLAGS) -I.. $(SYSDEFS) $(DEFINES) |
| 42 |
XJCFLAGS = -I$$OPENWINHOME/include |
| 43 |
|
| 44 |
BINDIR = /usr/local/bin |
| 45 |
|
| 46 |
# The install commands of BSD and System V differ in unpleasant ways: |
| 47 |
# -c: copy (BSD); -c dir: destination directory (SysV) |
| 48 |
# -s: strip (BSD); -s: suppress messages (SysV) |
| 49 |
# Also, the destination specification is very different. |
| 50 |
# The result is that the System V install command must not be used. |
| 51 |
# If you know that /bin/install is the BSD program, you can use it. |
| 52 |
# "cp" will work reasonably well, but be aware that any links continue |
| 53 |
# referencing the old file with new contents. |
| 54 |
|
| 55 |
INSTALLFLAGS = # -g bin -o root |
| 56 |
|
| 57 |
# to install executable files |
| 58 |
XINSTALL=cp |
| 59 |
#XINSTALL=/usr/ucb/install $(INSTALLFLAGS) -c -m 755 # -s |
| 60 |
|
| 61 |
C_SRC = jovetool.c xjove.c jovewindows.c xjovewindows.c jovemenu.c \ |
| 62 |
exts.h jovewindows.h mousemsg.h xjovewindows.h |
| 63 |
ICONS = jove.icon jove.cursor copy.cursor cut.cursor paste.cursor |
| 64 |
MISC = Makefile README |
| 65 |
BACKUPS = $(C_SRC) $(ICONS) $(MISC) |
| 66 |
|
| 67 |
default: xjove |
| 68 |
|
| 69 |
install: installxjove |
| 70 |
|
| 71 |
FLIST=.filelist |
| 72 |
|
| 73 |
$(FLIST): $(BACKUPS) |
| 74 |
@ls $(BACKUPS) > $(FLIST) |
| 75 |
|
| 76 |
installxjove: xjove |
| 77 |
$(XINSTALL) xjove $(BINDIR)/xjove |
| 78 |
|
| 79 |
installjovetool: jovetool |
| 80 |
$(XINSTALL) jovetool $(BINDIR)/jovetool |
| 81 |
|
| 82 |
jovetool: jovetool.o jovewindows.o |
| 83 |
$(CC) $(OPTFLAGS) $(LDFLAGS) -o jovetool jovetool.o jovewindows.o -lsuntool -lsunwindow -lpixrect |
| 84 |
|
| 85 |
jovetool.o: jovetool.c exts.h mousemsg.h $(ICONS) |
| 86 |
|
| 87 |
jovewindows.o: jovewindows.c jovemenu.c exts.h jovewindows.h ../tune.h |
| 88 |
|
| 89 |
xjove: xjove.o xjovewindows.o |
| 90 |
$(CC) $(OPTFLAGS) $(LDFLAGS) $(XJLDFLAGS) -o xjove xjove.o xjovewindows.o -lxview -lX11 |
| 91 |
|
| 92 |
xjove.o: xjove.c exts.h mousemsg.h $(ICONS) |
| 93 |
$(CC) $(CFLAGS) $(XJCFLAGS) -c xjove.c |
| 94 |
|
| 95 |
xjovewindows.o: xjovewindows.c jovemenu.c exts.h xjovewindows.h ../tune.h |
| 96 |
$(CC) $(CFLAGS) $(XJCFLAGS) -c xjovewindows.c |
| 97 |
|
| 98 |
tags: $(C_SRC) |
| 99 |
ctags -w $(C_SRC) |
| 100 |
|
| 101 |
# override CIFLAGS with something like: |
| 102 |
# CIFLAGS = -m'some reason for change' -u4.14.10.n -q |
| 103 |
|
| 104 |
ciall: |
| 105 |
ci $(CIFLAGS) $(BACKUPS) |
| 106 |
|
| 107 |
clean: |
| 108 |
rm -f a.out core *.o jovetool xjove '#'*~ .filelist |
| 109 |
|
| 110 |
clobber: clean |
| 111 |
rm -f *.orig *.rej |