# Makefile for building
# /cvs/vdkxdb/testxdb/testxdb


####### Compiler, tools and options
C        =  gcc
CC       =  g++
CFLAGS   =  -g -Wall `vdkxdb-config --cflags`

INCPATH  = -I./
DEFD     = -DNONE -DVDKXDB_SUPPORT
LINK     =  g++
LIBS     =  `vdkxdb-config --libs`

####### Files
PRJ_DIR =	/cvs/vdkxdb/testxdb

HEADERS =	$(PRJ_DIR)/testxdb.h\
	$(PRJ_DIR)/testxdb_gui.h\



SOURCES = 	$(PRJ_DIR)/testxdb.cc\
	$(PRJ_DIR)/testxdb_gui.cc\



OBJECTS =	$(PRJ_DIR)/testxdb.o\
	$(PRJ_DIR)/testxdb_gui.o\



OTHERS_OBJECTS =


TARGET =	testxdb

PRG_ARGS =	

####### Implicit rules
.SUFFIXES: .cc .c

.cc.o:
	$(CC) -c   $(CFLAGS) $(INCPATH) $(DEFD) -o $@ $<

.c.o:
	$(C)  -c   $(CFLAGS) $(INCPATH) $(DEFD) -o $@ $<

####### Build rules

all: $(TARGET)

$(TARGET): $(OBJECTS)
	$(LINK)  -o $(TARGET) $(OBJECTS) $(OTHERS_OBJECTS) $(LIBS)

####### Running (used by builder)

run: $(TARGET)

	cd /cvs/vdkxdb/testxdb

	./testxdb $(PRG_ARGS)

	cd /cvs/vdkxdb/testxdb


clean:
	-rm -f $(OBJECTS) $(TARGET)
	-rm -f *~ core

####### Compile


$(PRJ_DIR)/testxdb.o : $(PRJ_DIR)/testxdb.cc\
	$(PRJ_DIR)/testxdb.h\
	$(PRJ_DIR)/config.h\
	$(PRJ_DIR)/testxdb_gui.h

$(PRJ_DIR)/testxdb_gui.o : $(PRJ_DIR)/testxdb_gui.cc\
	$(PRJ_DIR)/testxdb.h
