
#  I use the latest gcc to find bugs..
#CC=gcc2.3.3
#CC=gcc

# Warning - edit config.h if you want to change various things...
#ifdef HPArchitecture
ANSI = -Aa -D_HPUX_SOURCE
#if ProjectX < 5
CCOPTIONS = $(ANSI) -DRINT /* HP-UX 8.07 */
#else
CCOPTIONS = $(ANSI) /* HP-UX 9.01 [already has rint()] */
#endif
#endif

# All of the source files
# psc.c - Convert ascii input to SC/XSpread format.

SRCS = cmds.c crypt.c format.c gram.c graphic_main.c help.c interp.c lex.c \
       matrix.c plot_XY.c plot_bar.c plot_line.c plot_pie.c plot_stk_bar.c \
       sc.c range.c screen.c scXstuff.c utils.c vi.c vmtbl.c xmalloc.c \
       version.c

OBJS = cmds.o crypt.o format.o gram.o graphic_main.o help.o interp.o lex.o \
       matrix.o plot_XY.o plot_bar.o plot_line.o plot_pie.o plot_stk_bar.o \
       sc.o range.o screen.o scXstuff.o utils.o vi.o vmtbl.o xmalloc.o \
       version.o

HDRS = config.h experres.h graphic_gvar.h pattern.h plot.h sc.h scXstuff.h \
       statres.h y.tab.h

# For OSF(DEC Alpha things) add -ldnet_stub
EXTRA_LIBRARIES = $(XLIB) -lm 

ComplexProgramTarget(xspread)

gram.o: sc.h y.tab.h gram.c
	$(CC) ${CFLAGS} -c gram.c
	sed<gram.y >experres.h -f eres.sed;sed < gram.y > statres.h -f sres.sed

gram.c: gram.y
	$(YACC) -d gram.y; mv y.tab.c gram.c

