#
# Makefile for xed using XawPlus
# Version for S.u.S.E. Linux 4.4.1 (XFree 3.2A)
#
# Roland Krause 1997
#

LIB_PATH =	-L../../XawPlus -L/usr/X11/lib		# Libraries for X windows
INC_PATH =	-I../../XawPlus -I/usr/X11/include	# Header for X windows
LIBRARIES =	-lXawPlus -lXmu -lXext -lXt -lXpm -lX11

CC =		gcc 
DEFS =		-O2 -m486 
OBJS =		edit.o      file_sel.o  search.o    warning.o \
		file.o      jump.o      special.o   xedit.o

all:		prog install
prog:		xed xed.1x

# --- Clean up

clean:
		rm -f *.o *.1x xed

# --- Install xed: This only works as superuser root

install:
		cp xed /usr/X11/bin
		cp Xed /usr/X11/lib/X11/app-defaults
		cp xed.help /usr/X11/lib/X11
		cp xed.1x /usr/man/man1
		gzip /usr/man/man1/xed.1x

# --- Build xed

xed:		$(OBJS)
		$(CC) -o xed $(LIB_PATH) $(OBJS) $(LIBRARIES)
		strip xed

.c.o:
		$(CC) $(DEFS) $(INC_PATH) -c $<

# --- Build the manual

xed.1x:		xed.man
		nroff -man xed.man >xed.1x
