########################################################################
#           Makefile for CEBAF Developed Library based on ACE          #
########################################################################
ifeq ($(SHOBJ),YES)
LIB = libCebafACE.sl
else
LIB = libCebafACE.a
endif

OBJS = X_Reactor.o reactorTimer.o reactorTimerRep.o

ifeq ($(ARCH), HP_UX)
EXTRA_INCLUDES = -I/usr/include/X11R5 -I/usr/include/Motif1.2
endif

include $(WRAPPER_ROOT)/Makefile.common

all: $(LIB)

ifeq ($(SHOBJ),YES)
$(LIB):$(OBJS)
	ld -b -o $@ $(OBJS)
else
$(LIB):$(OBJS)
	$(AR) ruv $@ $(OBJS)
	$(RANLIB) $@
endif
	if test ! -d $(WRAPPER_ROOT)/lib/$(ARCH); \
	then mkdir -p $(WRAPPER_ROOT)/lib/$(ARCH); else echo; fi
	cp $@ $(WRAPPER_ROOT)/lib/$(ARCH)

timerTest: timerTest.o
	rm -f $@
	$(CXX) -o $@ timerTest.o $(LDFLAGS) -lCebafACE -lSACE 

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