
#
# 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 -DBRIGHTON_DBG

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

# Source files
#
#SRC5=${SRC6} brightonPic.c
#SRC4=${SRC5} brightonDispatch.c brightonDisplay.c brightonPanelMgt.c
#SRC3=${SRC4} brightonDevice.c brightonRotary.c brightonScale.c brightonButton.c
#SRC2=${SRC3} brightonEventHandlers.c brightonBitmaps.c brightonDisplayMgt.c
#SRC1=${SRC2} brightonRender.c brightonColorMgt.c brightonXpmRead.c
SRC6=${SRC7} brightonTouchpanel.c
SRC5=${SRC6} brightonDisplay.c brightonShadowMgt.c brightonPic.c
SRC4=${SRC5} brightonDispatch.c brightonButton.c brightonScale.c
SRC3=${SRC4} brightonPanelMgt.c brightonDevice.c brightonRotary.c
SRC2=${SRC3} brightonXpmRead.c brightonColorMgt.c brightonRender.c
SRC1=${SRC2} brightonDisplayMgt.c brightonEventHandlers.c brightonBitmaps.c
BRIGHTONSRC=${SRC1} brightonWindowMgt.c brightonC.c brightonInterface.c

#
# Object files
#
#OBJ5=${OBJ6} brightonPic.o
#OBJ4=${OBJ5} brightonDispatch.o brightonDisplay.o brightonPanelMgt.o
#OBJ3=${OBJ4} brightonDevice.o brightonRotary.o brightonScale.o brightonButton.o
#OBJ2=${OBJ3} brightonEventHandlers.o brightonBitmaps.o brightonDisplayMgt.o
#OBJ1=${OBJ2} brightonRender.o brightonColorMgt.o brightonXpmRead.o
OBJ6=${OBJ7} brightonTouchpanel.o
OBJ5=${OBJ6} brightonDisplay.o brightonShadowMgt.o brightonPic.o
OBJ4=${OBJ5} brightonDispatch.o brightonButton.o brightonScale.o
OBJ3=${OBJ4} brightonPanelMgt.o brightonDevice.o brightonRotary.o
OBJ2=${OBJ3} brightonXpmRead.o brightonColorMgt.o brightonRender.o
OBJ1=${OBJ2} brightonDisplayMgt.o brightonEventHandlers.o brightonBitmaps.o
BRIGHTONOBJ=${OBJ1} brightonWindowMgt.o brightonC.o brightonInterface.o

PROGS	= libbrighton

all:	${PROGS}

libbrighton: ${BRIGHTONOBJ}
	cc -o libbrighton.so -shared --whole-archive ${BRIGHTONOBJ}
	rm -f brighton.a
	ar cr libbrighton.a ${BRIGHTONOBJ}
	ranlib libbrighton.a

install: ${PROGS}

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

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

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

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

