## Makefile for Olympus Plugin
##
## Copyright (c) 2000 Mount Linux Inc.
##
## This file is part of Mount Linux Olympus.
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License version 2 as published
## by the Free Software Foundation.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## for more details.
##
## You should have received a copy of version 2 of the GNU General Public
## License along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

include ../../../Make.rules

## Target Build Files
OBJECTS	= mod_template.o 

## Qt Meta Object Code (generated by moc)
SRCSMOC = moc_mod_template.cc 
OBJSMOC = moc_mod_template.o

## Compiler and Linker Flags
CPPFLAGS= $(G_CPPFLAGS) -Iinclude -Iui -Iicons -I../../client/include \
          -I../../client/netmessages/include -I../../common/include \
          -I../../lib/dlc -I../../lib/regexx/ $(QT_INCLUDES)
CXXFLAGS= $(G_CXXFLAGS) -ggdb -fPIC
DEFS    = $(G_DEFS)
LDFLAGS = $(G_LDFLAGS) -shared -Xlinker -E

## Target Module Filename
MODULE  = mod_template.so

## Build Targets
.PHONY: all all-recursive moc

all all-recursive:
	@echo "==> Building $(MODULE) in ."
	@( $(MAKE) $(MFLAGS) DIR="$(DIR)" $(MODULE) ) || exit 1

moc: $(SRCSMOC)

.cc.o:
	$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@

$(MODULE): $(SRCSMOC) $(OBJSMOC) $(OBJECTS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(MODULE) $(OBJECTS) $(OBJSMOC)

$(SRCSMOC):
	$(QT_MOC) $< -o $@

## Clean Targets
.PHONY: clean clean-recursive distclean distclean-recursive

clean clean-recursive:
	@if test "x$(DIR)" = "x";then thisdir=".";else thisdir="$(DIR)";fi; \
	 echo "==> Cleaning files from $$thisdir"
	rm -f $(SRCSMOC) $(OBJSMOC) $(OBJECTS) $(MODULE)

distclean:
	@( cd .. && $(MAKE) $(MFLAGS) distclean ) || exit 1

distclean-recursive: clean-recursive
	rm -f Makefile

## Qt Meta Object Code (generated by moc)
moc_mod_template.cc: mod_template.h
moc_mod_template.o: moc_mod_template.cc

## Dependencies
