########################################################################
#           Makefile for shared object
########################################################################
.suffix: .cc .o .so
CDEVSRCROOT = $(CDEVROOT)/src
EPICSVER = r3_12
TARGET = hp700
#TARGET = hp

EPICSINCLUDES = -I$(EPICS)/base/include
EPICSLIBS = -L$(EPICS)/base/lib/$(TARGET) -lca -lAs -lCom

#EPICSINCLUDES = -I$(EPICS)/$(EPICSVER)/share/epicsH
#EPICSLIBS = -L$(EPICS)/$(EPICSVER)/Unix/$(TARGET)/bin -lca -lUnix -lCom -lPW

ifeq ($(SHOBJ), NO)
CXX = /usr/bin/CC +A
LIBS = 	-L$(CDEVROOT)/lib/$(TARGET) -lEpicsCC -lEpicsCa \
	$(EPICSLIBS) -ly -ll -lm 
else
CXX = /usr/bin/CC
LIBS = 	-L$(CDEVROOT)/lib/$(TARGET) -lEpicsCC -ly -ll -lm 
endif

CXXFLAGS = -I$(CDEVROOT)/include -g -DHP_UX

OBJS = catest.o
OBJS1 = detachTest.o


.cc.o:
	rm -f $@
	$(CXX) $(CXXFLAGS) -c $< -o $@

all: catest detachTest

catest: $(OBJS)
	rm -f $@
	$(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@

detachTest: $(OBJS1)
	rm -f $@
	$(CXX) $(CXXFLAGS) $(OBJS1) $(LIBS) -o $@

clean:
	rm -rf *.o *.a *~ core catest detachTest ptrepository
