# makefile for wp2latex for EMX (gcc)
# runs under DOS, linux, solaris and perhaps OS/2
#
GCC=gcc
FLAGS=-Wall -O2 -I../atoms/include/
OBJ=.o


# Uncomment next line for compile a debugging version of WP2LaTeX
#DEBUG=-DDEBUG -g



######### End of definitions starting compile rules ###########

.SUFFIXES: .cc $(OBJ) .exe

.cc$(OBJ):
	$(GCC) $(FLAGS) $(DEBUG) -c $*.cc $(ERROR) -o $*$(OBJ) $(GETTEXT)

$(OBJ).exe:
	$(GCC) $(FLAGS) $*$(OBJ) $(LIBS) $(ERROR)

cplib: cplib$(OBJ) ../atoms/strings$(OBJ) ../atoms/lists$(OBJ) ../atoms/dbllist$(OBJ)
	$(GCC) -o cplib cplib$(OBJ) ../atoms/strings$(OBJ) ../atoms/lists$(OBJ) ../atoms/dbllist$(OBJ)

trn.trn: cplib wp4a.enc wp5.enc wp5_cz.enc wp6.enc
	cplib

../atoms/strings$(OBJ): ../atoms/strings.cc
../atoms/lists$(OBJ):   ../atoms/lists.cc
../atoms/dbllist$(OBJ): ../atoms/dbllist.cc


all:     trn.trn
#	$(TARGET_NAME) -i test/charactr.wp

default: trn.trn
#

clean:
	rm -f *.exe *$(OBJ) *.obj *.bak core cplib


