# liner - graphical output from textmode applications
# Copyright (C) 2006, 2007 Joerg Kurrek
#
# 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 of the License, 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; if not, write to the Free Software Foundation, Inc., 51
# Franklin St, Fifth Floor, Boston, MA 02110, USA 
#
PROG="\"liner\""
VERSION="\"1.09c\""
YEAR="\"2024\""
first: default

coutput.o: coutput.cpp coutput.h
	g++ ${FGLOPTS} ${CCOPTS} -c coutput.cpp -DTEST=1

cinput.o: cinput.cpp cinput.h
	g++ ${FGLOPTS} ${CCOPTS} -c cinput.cpp -DTEST=1 

cmain.o: cmain.cpp cmain.h
	g++ ${FGLOPTS} ${CCOPTS} -c cmain.cpp -DTEST=1 
  
cdraw.o: cdraw.cpp cdraw.h
	g++ ${FGLOPTS} ${CCOPTS} -c cdraw.cpp -DTEST=1 
	
liner: liner.cpp cinput.o coutput.o cmain.o cdraw.o
	g++ -DPROG=${PROG} -DVERSION=${VERSION} -DYEAR=${YEAR} \
	-L/usr/X11R6/lib  -o liner \
	liner.cpp \
	cinput.o \
	coutput.o \
	cmain.o \
	cdraw.o -lX11

example1: example1.c
	gcc -o example1 example1.c

example5: example5.c
	gcc -lm -o example5 example5.c

default: liner example1 example2 example3 example4 example5

run:
	./example4|./liner

clean:
	rm *~ *.bak *.o 2>/dev/null | true

#install:
#	install -m 755 liner example1 example2 example3 example4 example5 /usr/local/bin;\
#	install -m 644 liner.h /usr/local/include

install:
	cp liner example1 example2 example3 example4 example5 /usr/local/bin;\
	chmod 755 /usr/local/bin/{example1,example2,example3,example4,example5};\
	cp liner.h /usr/local/include;\
	chmod 644 /usr/local/include/liner.h
