#
# wmbinclock Makefile by Thomas Kuiper <tkuiper@inxsoft.net>
#
# Copyright (C) 2003 Thomas Kuiper <tkuiper@inxsoft.net>
#
# 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, or (at your option)
# any later version.
#
# 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 the GNU General Public License
# along with this program (see the file COPYING); if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA  02111-1307, USA
#
CC     = gcc
CFLAGS = -O2 -Wall
INCDIR = -I/usr/X11R6/include/X11 -I/usr/X11R6/include
DESTDIR= /usr/X11R6
LIBDIR = -L/usr/X11R6/lib
# for linux
LIBS   = -lXpm -lX11 -lXext -lm
# for Solaris
# LIBS   = -lXpm -lX11 -lXext -lsocket
OBJS   = wmBinClock.o \
         xutils.o


.c.o:
	$(CC) $(CFLAGS) -D$(shell echo `uname -s`) -c $< -o $*.o $(INCDIR)


all:	wmBinClock.o wmBinClock

wmBinClock.o: wmBinClock_master.xpm wmBinClock_mask.xbm
wmBinClock:	$(OBJS) 
	$(CC) $(CFLAGS) $(SYSTEM) -o wmBinClock $^ $(INCDIR) $(LIBDIR) $(LIBS)

clean:
	for i in $(OBJS) ; do \
		rm -f $$i; \
	done
	rm -f wmBinClock

install:: wmBinClock
	install -c -s -m 0755 wmBinClock $(DESTDIR)/bin

