# Generated automatically from Makefile.in by configure.
#-----------------------------------------------------------------------------
#  Copyright (c) 1991,1992 Southeastern Universities Research Association,
#                          Continuous Electron Beam Accelerator Facility
# 
#  This software was developed under a United States Government license
#  described in the NOTICE file included as part of this distribution.
# 
#  CEBAF Data Acquisition Group, 12000 Jefferson Ave., Newport News, VA 23606
#  Email: coda@cebaf.gov  Tel: (804) 249-7101  Fax: (804) 249-7363
# -----------------------------------------------------------------------------
#  
#  Description:
# 	Makefile for xcefdmp utility
# 	
#  Author:  Jie Chen, CEBAF Data Acquisition Group
# 
#  Revision History:
#    $Log: Makefile.in,v $
#    Revision 2.12  2003/11/12 19:53:27  abbottd
#     solaris 8 fixes
#
#    Revision 2.11  1999/10/25 17:22:55  abbottd
#    Fixes for Red Hat Linux 6.0
#
#    Revision 2.10  1999/10/14 18:03:23  rwm
#    Fix for ET.
#
#    Revision 2.9  1998/11/13 19:11:10  timmer
#    simplify
#
#    Revision 2.8  1998/11/06 15:10:34  timmer
#    touch up
#
#    Revision 2.7  1998/10/09 19:34:30  timmer
#    use system configure.in
#
#    Revision 2.5  1998/09/15 20:32:52  rwm
#    Not using ET yet.
#
#    Revision 2.4  1998/01/08 18:43:26  heyes
#    add evTags to Makefile
#
#    Revision 2.3  1998/01/08 16:32:04  heyes
#    use flex not lex
#
#    Revision 2.2  1997/10/20 14:12:28  heyes
#    made embeddable
#
#    Revision 2.1  1997/06/11 17:30:03  heyes
#    fix for configure
#
#    Revision 1.4  1997/06/11 01:43:36  heyes
#    spy on DD systemcd /usr/local/coda/linux/source/event/xcefdmp!
#
#    Revision 1.3  1997/06/10 17:12:23  heyes
#    no cp
#
#    Revision 1.2  1997/06/07 11:25:04  heyes
#    fix for linux
#
#    Revision 1.1.1.1  1996/09/19 18:26:25  chen
#    original port to solaris
#
#
CC       = gcc
YACC     = yacc
LEX      = flex -l8
CODA_INC = /usr/local/coda/2.5/common/include
CODA_LIB = /usr/local/coda/2.5/Linux/lib
CODA_BIN = /usr/local/coda/2.5/Linux/bin
CODA_COMMON_LIB = /usr/local/coda/2.5/common/lib

# for ET system, add -DWITH_ET flag

CFLAGS = -fwritable-strings -D_POSIX_THREADS -D_LANGUAGE_C -I. -I./WIDGETS \
	-I/usr/X11R6/include  -DWITH_ET -I$(CODA_INC)

SYSLIBS = -L/usr/X11R6/lib -lXm -lXp -L/usr/X11R6/lib -lXpm -lXext -lXt -lX11 -ll -lieee -lm -lm -lnsl -lresolv -ldl -lpthread

LOCAL_LIBS = -L$(CODA_LIB) -lCREG -let -lcoda \
	./WIDGETS/libxwidgets.a -L/usr/local/lib

OBJS = 	xcef_layout.o \
	xcef_callbacks.o \
	xevent_tree.o \
	xdict_tree.o \
	xcef_hexdec_conv.o \
        xcef_init.o \
        bufcpy.o \
        event_tree.o \
	cef_util.o \
        xcef_node_name.o \
        xcef_pix.o \
	parse_format.o \
	sprint_item.o \
	xcef_intro.o \
	get_ascii_buffer.o \
	xcef_spy_event.o \
	coda_color.o \
	xcef_context_help.o \
	xcef_xmisc.o \
	xcef_value_mask.o \
	y.tab.o \
	lex.yy.o \
	cefDictTree.o \
	cefDictParse.o 

all: evfile_msg.h xcefdmp

install:  xcefdmp
	cp xcefdmp $(CODA_BIN)
	cp evTags  $(CODA_COMMON_LIB)

evfile_msg.h:	evfile.msg 
	makeMsgTbl

xcefdmp: libWidgets $(OBJS)
	rm -f $@
	$(CC) -o $@ $(OBJS) $(LOCAL_LIBS) $(SYSLIBS)

libWidgets:
	cd WIDGETS;make

y.tab.c "y.tab.h: cefdict_parser.y
	rm -f $@
	$(YACC) -d cefdict_parser.y

lex.yy.c: cefdict_lex.l y.tab.h
	rm -f $@
	$(LEX) cefdict_lex.l

.c.o:
	rm -f $@
	$(CC) -o $@ $(CFLAGS) -c $<

clean:
	rm -f *.o xcefdmp *~ core y.tab.c lex.yy.c y.tab.h

