#
#                Makefile template for C, C++
#

#  CC     = compiler
#  CFLAGS = compiler flags ( -c is not needed )
#  LFLAGS = load flags not allready specified with CFLAGS
#  LIBS   = libraries to be linked with
#  OBJS   = object files to link into EXE


CC     = g++
CFLAGS = -Wall -O2 -m486
LFLAGS = -m486 -O2 -s
LIBS   = -lX11 -lm


OBJS	= xwin.o fieldmeter.o cpumeter.o memmeter.o \
          swapmeter.o netmeter.o netinmeter.o \
          netoutmeter.o xosview.o main.o

#-----------------------------------------------------------------------

all : .depend xosview

xosview : $(OBJS)
	$(CC) $(CFLAGS) $(LFLAGS) -o xosview $(OBJS) $(LIBS)

install: xosview
	rm -f $(OBJS) .depend
	install -c -s xosview /usr/X11/bin/xosview

install.man:
	install -c -m 0444 xosview.1 /usr/X11/man/man1/xosview.1

depend dep :
	rm -f .depend
	$(CC) -MM *.cc > .depend

clean :
	rm -f .depend xosview $(OBJS)

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

-include .depend





