#  Copyright (C) 2005,2006 Bartek Dyda <kropki@yahoo.co.uk>.
# 
#  This file is part of Kropki.
#
#  Kropki 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.
#
#  Kropki 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, version 2, for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with Kropki; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#
CXXFLAGS =
LDFLAGS = -s
DEFS = -D__XWIN__ -DXWIN_BEZ_GRX -DMAX_GLEB_ANALIZY=45
LIBS = -L/usr/X11R6/lib -lX11
INCL = -I/usr/X11R6/include


objects = kro83.o ekran.o pla_skl.o stoper.o X2grx.o slownik.o
kropki = kropki

$(kropki) : $(objects)
	$(CXX) $(LDFLAGS) $(DEFS) $(INCL) -o$(kropki) $(objects) $(LIBS)

kro83.o: kro83.cc pla_skl.h stoper.h X2grx.h ekro.h sstop3.cc slownik.h
	$(CXX) -c $(CXXFLAGS) $(DEFS) -O3 -frerun-loop-opt kro83.cc

ekran.o: ekran.cc pla_skl.h stoper.h X2grx.h ekro.h slownik.h
	$(CXX) -c $(CXXFLAGS) $(DEFS) -O2 ekran.cc

pla_skl.o: pla_skl.h pla_skl.cc
	$(CXX) -c $(CXXFLAGS) $(DEFS) -O2 pla_skl.cc

stoper.o: stoper.h stoper.cc
	$(CXX) -c $(CXXFLAGS) $(DEFS) -O1 stoper.cc

X2grx.o: X2grx.h X2grx.cc
	$(CXX) -c $(CXXFLAGS) $(DEFS) -O1 X2grx.cc

slownik.o: slownik.h slownik.cc
	$(CXX) -c $(CXXFLAGS) $(DEFS) -O2 slownik.cc

.PHONY : clean
clean :
	-rm $(kropki) $(objects)

