# Makefile for XWorm.

#CC = cc
CC = gcc

HPFLAGS = -O -D_HPUX_SOURCE
SUNFLAGS = -O
LINUXFLAGS = -O

INCDIR = -I/usr/include/X11R5 -I/usr/include -I/usr/X11R6/include

HPLINK = -L/usr/local/lib/X11R5 -lXt -lX11 -lm
SUNLINK = -L/usr/local/lib/X11R5 -lXt -lX11 -lm -lsocket -lnsl -lICE -lSM
LINUXLINK = -L/usr/X11R6/lib -lXt -lX11 -lm

all: 
	@echo "Makefile for XWorm v1.02 - written by The Last Viking (C) 1995-97 Ekran Design."
	@echo " "
	@echo "type:"
	@echo " "
	@echo "  make hp     [HP/UX and similar systems]"
	@echo "  make sun    [Sun-Os/SUN systems]"
	@echo "  make linux  [linux systems]"
	@echo " "
	@echo "xworm.font, xworm.grid and xworm.raw has to be in the same directory as xworm"
	@echo "please check the Makefile if you have problems compiling the program"

hp: xworm.c
	$(CC) $(HPFLAGS) $(INCDIR) xworm.c -oxworm $(HPLINK)

sun: xworm.c
	$(CC) $(SUNFLAGS) $(INCDIR) xworm.c -oxworm $(SUNLINK)

linux: xworm.c
	$(CC) $(LINUXFLAGS) $(INCDIR) xworm.c -o xworm $(LINUXLINK)

clean:
	rm -f core xworm

