#
# File:		Makefile for samples
# Author:	Robert Roebling
# Created:	1999
# Updated:	
# Copyright:	(c) 1998 Robert Roebling
#
# This makefile requires a Unix version of wxWindows
# to be installed on your system. This is most often
# done typing "make install" when using the complete
# sources of wxWindows or by installing the two
# RPM packages wxGTK.XXX.rpm and wxGTK-devel.XXX.rpm
# under Linux.
#

CXX = $(shell wxgtk-2.4-config --cxx)

PROGRAM = Mliter
DESTDIR =  /usr/local/
BINDIR =  $(DESTDIR)/bin/

OBJECTS = $(PROGRAM).o

# implementation

.SUFFIXES:	.o .cpp

.cpp.o :
	$(CXX) -c -static `wxgtk-2.4-config --cxxflags` -o $@ $<

all:    $(PROGRAM)

$(PROGRAM):	$(OBJECTS)
	$(CXX) -o $(PROGRAM) $(OBJECTS) `wxgtk-2.4-config --libs`

install:
	install -d $(DESTDIR)/games//Mliter_pl/
	cp -r dane $(DESTDIR)/games/Mliter_pl/
	cp -r graf $(DESTDIR)/games/Mliter_pl/
	cp -r html $(DESTDIR)/games/Mliter_pl/
	cp -r slowniki $(DESTDIR)/games/Mliter_pl/
	install Mliter $(DESTDIR)/games/Mliter_pl/
	install czytaj.txt $(DESTDIR)/games/Mliter_pl/
	install lic_gpl.txt $(DESTDIR)/games/Mliter_pl/
	install -d $(BINDIR)
	install Mliteraki $(BINDIR)/

uninstall:
	rm -rf 	$(DESTDIR)/Mliter_pl/
	rm $(BINDIR)/Mliteraki
	
clean: 
	rm -f *.o $(PROGRAM)
