
# Comment out GLIBS and GINCS to not compile with GTK
#GLIBS = -DDOGTK -lgtk -lgdk
#GINCS = -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
LIBS = -L/usr/X11R6/lib -lX11 $(GLIBS)
CFLAGS = -Os -DCPU=386 -D__i386__ -m386 -malign-functions=0 -malign-jumps=0 \
-malign-loops=0 -fomit-frame-pointer -fno-builtin -fno-strength-reduce \
-fno-inline -pipe -Wall $(GINCS)
#CFLAGS = -g -O2 -fomit-frame-pointer -pipe -Wall $(GINCS)
#CFLAGS = -g -O2 -fomit-frame-pointer -pipe -Wall -DGREEK
STRIP = @ls -al $@;sstrip $@;ls -al $@
#STRIP = @ls -al $@;strip $@;ls -al $@

# select by uncommenting the desired keyboard binding type
TYPE = WORDSTAR
#TYPE = EMACS

# Use this for solaris
#LIBS = -L/usr/openwin/lib -lsocket -lnsl -lresolv -lXext -lX11
#CFLAGS = -O2 -pipe -Wall

all: edx e

edx: edx.c eeng.c ws.c emacs.c Makefile
	gcc edx.c $(CFLAGS) -D$(TYPE) $(LIBS) -o edx
	$(STRIP)

e: mye.c eeng.c Makefile
	gcc mye.c -O2 -DSTATICBUF -fomit-frame-pointer -ltermcap -o e
	$(STRIP)

clean:
	-rm -f *.o *.bak *~ edx e
