#########################################################
# Makefile for the Free LaserJet 4 Utility V1.1
#              by Frank Tegtmeyer (Rostock, Germany)
#

# -------------  please set up these values  ------------

# the name of the used language file
# possible values for now:   deutsch.txt (Germany)
#                            nl.txt      (Netherlands)
#                            english.txt

LANGUAGE_FILE = deutsch.txt


# Name of the used manual, only deutsch.man and english.man available.
# This should be no problem because the man page is not really needed.

MAN_FILE      = deutsch.man


# where to install the binary and the default
# language file
BINDIR = /usr/local/bin


# where to install the manual
#
MANDIR = /usr/man/man1
MANEXT = 1

# -------------  PROGRAMS  ------------------------------

CC   = gcc
MAKE = make

# -------------  PROGRAM FLAGS  -------------------------

CFLAGS = -ansi -pedantic -Wall -O -fwritable-strings \
         -DBINDIR=\"$(BINDIR)\"



# ===========  no more to change  =======================



# -------------  OBJECTS  -------------------------------

OBJECTS = lj4.o  ui_text.o

# -------------  THE RULES  -----------------------------

all:	lj4 

clean:
	/bin/rm -f ui_text.h *.o lj4 *.etf lj4.txt
	cd lingua13; make -f unix.mak clean

install: lj4 lj4.etf
	install -m755 lj4 $(BINDIR)/lj4
	install -m644 lj4.etf $(BINDIR)/lj4.etf
	install -m644 $(MAN_FILE) $(MANDIR)/lj4.$(MANEXT)

lj4:	$(OBJECTS)
	$(CC) -o lj4 $(OBJECTS)

lj4.o:	ui_text.h lj4.etf

ui_text.h lj4.etf:	lingua13/lingua Makefile
	cp $(LANGUAGE_FILE) lj4.txt
	@echo
	@lingua13/lingua lj4 V1.1p1
	@echo

lingua13/lingua:	lingua13/lingua.c
	cd lingua13; make -f unix.mak

ui_text.o:	lingua13/lingua
	cp lingua13/ui_text.o .

