CC =      gcc
DEFINES=
RELEASE=  gnuserv-2.1alpha

# Add a -I flag pointing make at the directory where it can get your 
# emacs' config.h file (usually "src" underneath the top of your emacs tree)

# If you don't have access to your emacs source tree, edit config.h.proto
# appropriately, and rename it to config.h in the current directory

INCLUDES = -Iyour_emacs_src_dir/src -I.

# If you don't want xauth(1X11)-style authentication compiled in, remove
# the define of AUTH_MAGIC_COOKIE from gnuserv.h, and comment out the 
# definitions of X11_INCLUDE, X11_LIBRARY and AUTHLIBS below...

# You may need to edit X11_INCLUDE AND X11_LIBRARY so that the
# compiler can find the X11/Xauth.h include file and the libXau.a library

X11_INCLUDE=  -I/usr/X11/include
X11_LIBRARY=  -L/usr/X11/lib 
AUTHLIBS=     $(X11_LIBRARY) -lXau

CFLAGS=       -g $(DEFINES) $(INCLUDES) $(X11_INCLUDE)
DEST=         /usr/local/bin


# You shouldn't need to change anything below this point.

OBJS=  gnuclient.o gnudoit.o gnuserv.o gnuslib.o
ALL=   gnuclient gnudoit gnuserv

all:		$(ALL)

gnuclient:	gnuclient.o gnuslib.o gnuserv.h 
		$(CC) $(CFLAGS) -o gnuclient gnuclient.o gnuslib.o $(AUTHLIBS)

gnudoit:	gnudoit.o gnuslib.o gnuserv.h 
		$(CC) $(CFLAGS) -o gnudoit gnudoit.o gnuslib.o $(AUTHLIBS)

gnuserv:	gnuserv.o gnuslib.o gnuserv.h
		$(CC) $(CFLAGS) -o gnuserv gnuserv.o gnuslib.o $(AUTHLIBS)

install:        $(ALL)
		mv $(ALL) $(DEST)

clean:
		/bin/rm -f $(ALL) *.o *~

tarchive:	clean
		- mkdir /tmp/$(RELEASE)
		- /bin/rm -rf /tmp/$(RELEASE)/*
		tar cf - * | (cd /tmp/$(RELEASE) ; tar xf - )
		/bin/rm -rf /tmp/$(RELEASE)/{RCS,config.h,*.orig}
		(cd /tmp; tar cf /tmp/$(RELEASE).tar $(RELEASE))
		gzip /tmp/$(RELEASE).tar
		/bin/rm -rf /tmp/$(RELEASE)
		mv -i /tmp/$(RELEASE).tar.gz /home/ftp/pub

# DO NOT DELETE THIS LINE -- make depend depends on it.

gnuclient.o: gnuserv.h  
gnudoit.o: gnuserv.h 
gnuserv.o: gnuserv.h
gnuslib.o: gnuserv.h 
