### static Makefile for openMosixcollector ###
#
#                          Makefile  -  description
#                             -------------------
#    begin                : now
#    copyright            : (C) 2003 by Matt Rechenburg
#    email                : mosixview@t-online.de
# ***************************************************************************
# *                                                                         *
# *   This program is free software; you can redistribute it and/or modify  *
# *   it under the terms of the GNU General Public License as published by  *
# *   the Free Software Foundation; either version 2 of the License, or     *
# *   (at your option) any later version.                                   *
# *                                                                         *
# ***************************************************************************

GCC=g++
TARGET=openmosixcollector
INITSCRIPT=openmosixcollector.init
OBJECTS=openmosixcollector.o main.o
INCLUDES=-I. -I.. 
CFLAGS=-O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new
LIBS=-lm -lresolv
CP=/bin/cp -f
RM=/bin/rm -f
BINDIR=/usr/bin
INITDIR=/etc/init.d/

all: clean
	$(GCC) $(INCLUDES) $(CFLAGS) -c openmosixcollector.cpp
	$(GCC) $(INCLUDES) $(CFLAGS) -c main.cpp

	$(GCC) $(CFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)


install:
	$(CP) $(TARGET) $(BINDIR)
	$(CP) $(INITSCRIPT) $(INITDIR)/$(TARGET)


clean:
	/bin/rm -f *.o
	/bin/rm -f *moc*
	/bin/rm -f $(TARGET)

distclean: clean

uninstall: clean
	$(RM) $(BINDIR)/$(TARGET)



