#
# FILE:
# Makefile
#
# FUNCTION:
# Hand-crafted Makefile for the stripchart widgets
#
# HISTORY:
# Created by Linas Vepstas January 2002
#

CFLAGS= `pkg-config gtk glib --cflags`
LIBS= -lgtkextra   `pkg-config gtk glib --libs`


OBJS= gtkstripchartcursor.o \
      gtkstripchartcursorset.o \
      gtkstripchartlimit.o \
      gtkstripchartstrip.o \
      gtkstripchart.o

INCS= gtkstripchartcursor.h \
      gtkstripchartcursorset.h \
      gtkstripchartlimit.h \
      gtkstripchartstrip.h \
      gtkstripchart.h


EXES = teststrip testpipe

all: tests 

tests: ${EXES}

teststrip: teststrip.o ${OBJS}
testpipe: testpipe.o ${OBJS}

teststrip.o: ${INCS}
testpipe.o: ${INCS}

gtkstripchart.o: ${INCS}
gtkstripchartcursor.o: gtkstripchartcursor.h
gtkstripchartcursorset.o: gtkstripchartcursorset.h
gtkstripchartlimit.o: gtkstripchartlimit.h
gtkstripchartstrip.o: ${INCS}

DOC_MODULE=bogus

doc-scan:
	gtkdoc-scan --module=$(DOC_MODULE) --source-dir=. 

doc-templates: doc-scan
	gtkdoc-mktmpl --module=$(DOC_MODULE)

docs:
	if ! test -d html ; then mkdir html ; fi
	-cd html && gtkdoc-mkhtml $(DOC_MODULE) ../gtkstripchart-docs.sgml




.o:
	cc -g -o $* $^ ${LIBS}
#	cc -pg -o $* $^ ${LIBS}

.c.o:
	cc -c -g -Wall -O2 $< ${CFLAGS}
#	cc -c -pg -fprofile-arcs -Wall -O2 $< ${CFLAGS} 


clean:
	rm -f *.o *.da ${EXES} html.stamp tmpl.stamp

realclean:	clean
	rm -f gmon.out a.out
	rm -rf html tmpl bogus* api.sgml
