
# Makefile for the Interlock Top Box
#
# Andy Green, Chris Cannam, 1994

# Defines:
#
#     + Define HAVE_NO_GETHOSTNAME if you have not got the
#       gethostname(3) call, or if you don't want the host
#       name displayed in the title bar.
#
#     + Define DEBUG for function entry/exit and memory
#       allocation debugging messages.
#
#     + Define REPORT_LINE_AND_FILE for verbose debugging
#       messages listing process id, filename and line no
#       for function entry and exit messages.  This is only
#       active if DEBUG is also defined.

CC		= cc -g

CFLAGS		= -I/homes/ma0/ma0cc/project/include -I/homes/ma0/ma0cc/project/bitmaps -woff 100
# -DDEBUG -DREPORT_LINE_AND_FILE
LDFLAGS		= -L/usr/lib/X11 -L/homes/ma0/ma0cc/project/lib
LIBRARIES	= -lYHelp -lY -lXaw -lXext -lXmu -lXt_s -lX11_s -lInterlock -lLists

TARGET		= rosegarden
HEADERS		= General.h Resources.h Visuals.h Widgets.h Fallbacks.h
OBJECTS		= Main.o Visuals.o Widgets.o 
SOURCES		= Main.c Visuals.c Widgets.c


rosegarden:	${OBJECTS} ../lib/libInterlock.a ../lib/libListsD.a ../lib/libY.a ../lib/libYHelp.a
		rm -f ${TARGET}
		${CC} -o ${TARGET} ${OBJECTS} ${LDFLAGS} ${LIBRARIES}

all:		${SOURCES}
		rm -f ${TARGET} ${OBJECTS}
		$(MAKE) rosegarden
		$(MAKE) backup

backup:		${SOURCES} ${HEADERS}
		for x in *.c *.h Makefile; do if [ -f $$HOME/backup-rosegarden/$$x ]; then :; else cp $$x $$HOME/backup-rosegarden/$$x; fi; done
		find . ! -name ${TARGET} ! -type d -newer $$HOME/backup-rosegarden/Makefile -exec cp {} $$HOME/backup-rosegarden \; ;

clean:
		rm -f ${OBJECTS}

depend:		${SOURCES} ${HEADERS}
		makedepend -- ${CFLAGS} -- ${SOURCES}


