#
# Makefile for xcalendar 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 -DATHENA
OBJS =		dayeditor.o lists.o xcalendar.o

all:		prog install
prog:		xcalendar xcalendar.1x

# --- Clean up

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

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

install:
		cp xcalendar /usr/X11/bin
		cp XCalendar /usr/X11/lib/X11/app-defaults
		cp *.xbm /usr/X11/include/X11/bitmaps
		mkdir -p /usr/lib/X11/xcalendar
		cp xcalendar.hlp /usr/lib/X11/xcalendar
		cp xcalendar.1x /usr/man/man1
		gzip /usr/man/man1/xcalendar.1x

# --- Build xcalendar

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

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

# --- Build the manual

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