# Alternate rules for building shared objects
# on Apple Darwin (Mac OS X) systems.

ifeq ($(usingDarwin), 1)

LIBDSO := $(LIBDSO:.so=.dylib)
LLDLIBS += -lXm -lXt -lX11 -lGLU -lGL -liconv -ldl -lcc_dynamic -lstdc++

BUNDLE := $(DSO:.so=.bundle)
DSO :=

$(BUNDLE): $(OBJECTS)
	$(CXX) $(CXXDSOOPTS) $(OBJECTS) $(LDLIBS) -o $@
	mv $@ $(@:.bundle=.so)

endif
