#
# /* LICENSE:  =========================================================================
#     RoboCup F180 Referee Box Source Code Release
#   -------------------------------------------------------------------------
#     Copyright (C) 2003 RoboCup Federation
#   -------------------------------------------------------------------------
#     This software is distributed under the GNU General Public License,
#     version 2.  If you do not have a copy of this licence, visit
#     www.gnu.org, or write: Free Software Foundation, 59 Temple Place,
#     Suite 330 Boston, MA 02111-1307 USA.  This program is distributed
#     in the hope that it will be useful, but WITHOUT ANY WARRANTY,
#     including MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#   ------------------------------------------------------------------------- 
# 
#  */
#
CC=g++

CFLAGS = -g `pkg-config gtkmm-2.0 --cflags`
LIBS += -lpthread `pkg-config gtkmm-2.0 --libs`
LDFLAGS=


SRCS= refereemm.cc gamecontrol.cc serial.cc 
OBJS= $(SRCS:.cc=.o) \
#DEPENDS := $(SRCS:%.cc=.%.dep)

# all:: referee
%.o: %.cc
	$(CC) -c $(CFLAGS) $(DEFS) -o $@ $<

#include $(DEPENDS)


.%.dep: %.cc
	@echo "Generating dependencies for: " $<
	@$(CC) -M $(CFLAGS) $< > $@.tmp
	@echo -n "$@ " >$@
	@cat $@.tmp >>$@
	@rm $@.tmp

all::referee

clean::
	rm -f *~ *.o
	rm referee


referee: $(OBJS)
	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LIBS)
