# Gcc usually works better if you have it.
#CC	= gcc
CC	= cc

# If the path to Xlib.h needs to be set explicitly...
XINC	= -I/usr/include/X11

# If you are on a Stardent Titan, then this will help it find random().
#BSD	= -43

# If you are using a compiler that supports prototypes then uncomment this.
# (Only little girlie men don't use prototypes. :-) )
#PROTO	= -DUSE_PROTOTYPES

SRCS	= xswarm.c
OBJS	= xswarm.o
HEADERS	= xswarm.h vroot.h patchlevel.h
PROGRAM	= xswarm

#CFLAGS	= $(BSD) $(PROTO) $(XINC) -g -DDEBUG
CFLAGS	= $(BSD) $(PROTO) $(XINC) -O

LIBS	= -lX11 -lm

$(PROGRAM): $(SRCS) $(HEADERS) Makefile
	$(CC) $(CFLAGS) -o $(PROGRAM) $(SRCS) $(LIBS)

distribution:
	shar -o xswarm.shar README $(SRCS) $(HEADERS) Makefile Imakefile xswarm.6

tar:
	tar cvf xswarm.tar README $(SRCS) $(HEADERS) Makefile Imakefile xswarm.6
	compress xswarm.tar
