#
# Makefile for xe : Editor for X Windows
# Nicer as xedit but not so powerful as xed
# Version for S.u.S.E. Linux 4.4.1 (XFree 3.2A)
#
# Roland Krause 1995
#

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

CC =		gcc 
DEFS =		-ansi -O2 -m486

all:		prog install
prog:		xe xe.1x

# --- Clean up

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

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

install:
		cp xe /usr/X11/bin
		cp Xe /usr/X11/lib/X11/app-defaults
		cp xe.1x /usr/man/man1
		gzip /usr/man/man1/xe.1x

# --- Build xe

xe:		xe.o filefunc.o
		$(CC) -o xe $(LIB_PATH) xe.o filefunc.o $(LIBRARIES)
		strip xe

xe.o:		xe.c xe.h filefunc.h
		$(CC) $(DEFS) $(INC_PATH) -c xe.c

filefunc.o:	filefunc.c filefunc.h bitmaps/file.xpm bitmaps/folder.xpm \
		bitmaps/tool.xpm bitmaps/shadefile.xpm bitmaps/shadefold.xpm
		$(CC) $(DEFS) $(INC_PATH) -c filefunc.c

# --- Build the manual

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