
#
# If you want to recompile all this lot then you have a few choices on for the
# bindings. The default is static, as defined here. You can change this to
# dynamic, but then you will get pretty much the same code as the distribution.
#
# Management of the ALSA support is painful. I either need a dummy library,
# which I do not want to have to maintain, or I need some intelligent library
# selection. Hm, I don't like "intelligent" solutions, since they usually
# miss too many possible clauses.
#
#BINDING	=static
BINDING	=dynamic

#
DESTDIR		=
INCPATH		= -I../include -I../bitmaps -I.
BINDIR		=

LIBSDIR		= -L/usr/lib -L/usr/X11R6/lib
LIBS		= -lX11 -lc -lm -lpthread
LDFLAGS		= ${LIBSDIR} -Xlinker -B${BINDING} ${LIBS}

CC			=	cc -O -fPIC
DEPEND		=	makedepend
INSTALL		=	install -c

#
# FEATURES include:
#
#FEATURES	=
FEATURES	= -D_REENTRANT -DDEBUG -DBRIGHTON_DBG

CFLAGS		= ${DEFINES} ${FEATURES} ${INCPATH}
MFLAGS		= -I.

# Source files
#
SRC1=${SRC2} bRender.c
BRIGHTONXSRC=${SRC1} bDisplay.c bRoutines.c bWindow.c bEvent.c bColor.c

#
# Object files
#
OBJ1=${OBJ2} bRender.o
BRIGHTONXOBJ=${OBJ1} bDisplay.o bRoutines.o bWindow.o bEvent.o bColor.o

PROGS	= libB11

all:	${PROGS}

libB11: ${BRIGHTONXOBJ}
	cc -o libB11.so -shared --whole-archive ${BRIGHTONXOBJ}
	rm -f libB11.a
	ar cr libB11.a ${BRIGHTONXOBJ}
	ranlib libB11.a

install: ${PROGS}

clean:
	@rm -f *~ core ${PROGS} ${BRIGHTONXOBJ} *.a *.so

lint:
	lint -bac ${DEFINES} ${BRIGHTONXSRC}

depend:
	${DEPEND} ${INCPATH} ${MFLAGS} ${BRIGHTONXSRC}

# DO NOT DELETE THIS LINE -- mkdep uses it.

