
# LIBRARY NAMES GIVEN BELOW
LIBRARIES=/usr/local/lib/libgpibenet.a

# INCLUDE SEARCH PATH GIVEN BELOW
INCLUDES= -Iinclude

VPATH=.:include

# LINKER FLAGS GIVEN BELOW
LDFLAGS=-L/usr/local/lib

# DEFINES
LD=gcc
CC=gcc

# COMPILER FLAGS GIVEN BELOW
CFLAGS= -c -g
PFLAGS=$(CFLAGS)
FFLAGS=$(CFLAGS)

.SUFFIXES: .uil .uid .c .o .f .for .F .hpf .mpl




# SOURCES GIVEN BELOW
SRCS=ecb-load.c ecbdriv_els.c gpib_els.c error_els.c

# OBJECTS GIVEN BELOW
OBJS=ecb-load.o ecbdriv_els.o gpib_els.o error_els.o

ecb_load : $(OBJS)
	$(LD) -o  $@ $(LDFLAGS) $(OBJS) $(LIBRARIES) -lm -ltermcap


# INCLUDE FILE DEPENDENCY GIVEN BELOW

ecb_load.o: ecb_load.h

ecbdriv_els.o: ecb_load.h

gpib_els.o: ecb_load.h

error_els.o: ecb_load.h



clean:
	$(RM) -rf $(OBJS) core tascom


.c.o:
	$(CC) $(CFLAGS) $(INCLUDES) $<

.f.o:
	$(FC) -c $(FFLAGS) $(INCLUDES) $<


.p.o:
	$(PC) -c $(PFLAGS)  $(INCLUDES) $<


.c.a:
	$(CC) -c $(CFLAGS) $(INCLUDES) $<
	$(AR) $(ARFLAGS) $@ $*.o
	$(RM) -f $*.o

.f.a:
	$(FC) -c $(FFLAGS) $(INCLUDES) $<
	$(AR) $(ARFLAGS) $@ $*.o
	$(RM) -f $*.o

.p.a:
	$(PC) -c $(PFLAGS) $(INCLUDES) $<
	$(AR) $(ARFLAGS) $@ $*.o
	$(RM) -f $*.o

lint:
	lint $(INCLUDES) $(SRCS) $(LINTLIBS)


depend:
	@cat < /dev/null > makedep
	@for i in ${SRCS}; do \
		 ($(CC) -M $(INCLUDES) $$i >> makedep); done
	@echo '/^# DO NOT DELETE THIS LINE/+1,$$d' > eddep
	@echo '$$r makedep' >> eddep
	@echo 'w' >> eddep
	@${CP} makefile makefile.bak
	@ed - makefile < eddep
	@$(RM) -f eddep makedep
	@echo '# DO NOT EDIT THIS FILE HERE.' >> makefile
	@echo '# USER EDITS MUST PRECEDE THE COMMENT:' >> makefile
	@echo '# "# DO NOT DELETE THIS LINE".' >> makefile
	@echo '# see make depend above' >> makefile


touchsrcs:
	touch $(SRCS)

# DO NOT DELETE THIS LINE -- make depend uses it

