LIBRARY = wireglutil
SHARED = 1
FILES = bufpool devnull dso endian error hash instrumentation mem \
	net os parse serial tcpip timer url

CFLAGS += -DINSTRUMENT
CXXFLAGS += -DINSTRUMENT

# define to use the debugging malloc library on Linux
# USE_DMALLOC = 1

# this is grafted in from humper.mk, because we need it's value before
# we can include humper.mk.  ooops.
ifneq ($(ARCH), WIN_NT)
ifneq ($(ARCH), WIN_98)
ARCH=$(shell uname | sed -e 's/-//g')
endif
endif

## Uncomment for Myrinet GM Support
#
#ifeq ($(ARCH),Linux)
#GM_SUPPORT = 1
#endif 
#ifeq ($(ARCH),WIN_NT)
#GM_SUPPORT = 1
#endif

# this has to happen before humper.mk
ifdef GM_SUPPORT
CFLAGS += -DGM_SUPPORT
CXXFLAGS += -DGM_SUPPORT
FILES += gm
ifeq ($(ARCH),WIN_NT)
LDFLAGS += gm.lib
else
LDFLAGS += -lgm
endif
endif

ifdef USE_DMALLOC
ifeq ($(ARCH),Linux)
CFLAGS += -DUSE_DMALLOC
CXXFLAGS += -DUSE_DMALLOC
LDFLAGS += -ldmalloc
endif
endif

include ../../humper.mk

ifdef WINDOWS
LDFLAGS += user32.lib ws2_32.lib
endif

ifndef WINDOWS
LDFLAGS += -ldl
endif
