1
2# Simple Makefile for XR, C Cannam 1993.  Sorry no imake.
3
4# Defines:
5#
6#     + Define SOLARIS for work around dodgy bit in Solaris gcc
7#    where the size of jmp_buf is apparently wrong.
8#
9#     + Define LINUX for linux; at present all this does is take
10#    out references to SIGBUS.
11#
12#     + Define WAIT_PID for systems lacking wait4 but having
13#    waitpid; if your system has neither but has instead wait3,
14#    define WAIT_THREE.  If you have wait4, define neither.
15#
16#     + Define HAVE_VIEWPORT_SET_FUNCTIONS if your Xaw supports
17#    the function XawViewportSetCoordinates.  Many versions do,
18#    and it works much better than XReduce's hacked alternatives.
19#    If you're unsure but patient, define it and see if it links.
20#
21#     + Define HAVE_GETHOSTNAME if you have the gethostname(3)
22#    call and want the host name displayed in XR's title bar.
23#
24#     + Define EXPLICIT_EDITRES for explicit inclusion of the
25#    Editres Protocol files and error handler (shouldn't be
26#    necessary, and isn't particularly recommended).
27
28# If you define WAIT_THREE or WAIT_PID and leave undefined
29# HAVE_GETHOSTNAME, there should be no remaining BSDisms (and
30# the code is mostly POSIX compliant).  The X code used is only
31# X11 (R4 or R5), Xt and Athena; there's no OL or Motif or
32# anything.  All C code is K & R; using an ANSI-only compiler
33# will fail utterly.
34
35
36CC 		= cc
37
38CFLAGS		= -g -DHAVE_VIEWPORT_SET_FUNCTIONS -DHAVE_GETHOSTNAME #-DEXPLICIT_EDITRES
39LDFLAGS		= -L/usr/lib/X11
40
41# # Solaris
42#
43# CFLAGS	= -g -DHAVE_VIEWPORT_SET_FUNCTIONS -DSOLARIS -DWAIT_PID
44# LDFLAGS	= -L/usr/lib -L/usr/ccs/lib
45
46HFLILES		= fallback.h  font.h      manager.h   printer.h   xredres.h\
47		fancy.h     help.h      message.h   verbal.h    xredrres.h\
48		fchoose.h   input.h     option.h    widgets.h   xredtech.h\
49		file.h      main.h      output.h    xredplus.h  xreduce.h
50
51OBJECTS		= main.o verbal.o xredtech.o input.o widgets.o output.o fancy.o message.o option.o font.o help.o manager.o printer.o file.o fchoose.o newhelp.o
52SOURCES		= main.c verbal.c xredtech.c input.c widgets.c output.c fancy.c message.c option.c font.c help.c manager.c printer.c file.c fchoose.c newhelp.c
53
54xr:		${OBJECTS} ${HFILES}
55		rm -f xr
56		${CC} -o xr ${OBJECTS} ${LDFLAGS} -lX11 -lXt -lXaw -lXmu -lXext -lm
57
58# # For dynamic loading on Solaris perhaps put this into the preceding line:
59# -YP,:/opt/SUNWspro/SC2.0.1:/usr/ccs/lib:/usr/lib
60
61all:		${SOURCES} ${HFILES}
62		rm -f xr *.o
63		make xr
64
65lint:		${SOURCES}
66		${LINT} ${SOURCES}
67
68clean:
69		rm -f *.o
70
71