# Generated automatically from Makefile.in by configure.
###/* This file is part of
###* ======================================================
###*
###*           LyX, the High Level Word Processor
###*
###*           Copyright (C) 1995 Matthias Ettrich
###*
###*======================================================*/
###
###
### Makefile by Jean-Marc Lasgouttes (Jean-Marc.Lasgouttes@inria.fr)
###


# Common prefix for all directories.
prefix = /usr/X11R6
exec_prefix = ${prefix}
srcdir = .
bindistdir = lyx-0.10.0-bin

# For the lyx binary
LYX_BINDIR = ${exec_prefix}/bin

# For all LyX support files
LYX_DIR = ${exec_prefix}/lib/lyx

# For LyX's man page
LYX_MANDIR = ${prefix}/man

# C++ compiler and flags (you may replace CXXFLAGS by `-O2' if you want 
# a faster executable without debug information. This can also be done
# by setting the CXXFLAGS environment variable before running configure. 
CXX = gcc
CXXFLAGS = -g -O -Wall -Wno-unused

# Libraries for linking and flags for the C preprocessor. If you need to
# modify this to compile LyX, please send a bug report so that we can 
# improve configure.
LIBS = -lforms -lXpm  -lSM -lICE -lc -lm   -L/usr/X11R6/lib -lX11 
CPPFLAGS =   -I/usr/X11R6/include -I./images

###################################################################
# You should not need to change anything below this line.

# The GNU coding standards recommends this. Don't ask me why...
SHELL = /bin/sh
.SUFFIXES:
.SUFFIXES: .C .o

# Various commands
FIND = find
ETAGS = etags
MKINSTALLDIRS = $(srcdir)/mkinstalldirs
INSTALL = /usr/bin/install -c
RM = rm -f
MANSUFFIX = 1

SRCS =	lyx_main.C lyx.C lyx_cb.C inset.C lyxfont.C file.C paragraph.C \
	layout.C screen.C text.C text2.C spellchecker.C kbmap.C \
	lyxserver.C bmtable.C math_symbols.C keybind.C credits.C docu.C \
	menus.C intl.C form1.C credits_form.C layout_forms.C print_form.C \
	figinset.C toolbar.C formula.C math_hash.C math_inset.C \
	math_parser.C math_write.C math_draw.C latex.C texoptions.C \
	table.C buffer.C symgen.C lastfiles.C sp_form.C paths.C \
	math_panel.C lyxrc.C lyxlex.C lyxparameters.C autocor.C combox.C \
        minibuffer.C math_delim.C math_forms.C math_cursor.C

OBJS =	lyx_main.o lyx.o lyx_cb.o inset.o lyxfont.o file.o paragraph.o \
	layout.o screen.o text.o text2.o spellchecker.o kbmap.o \
	lyxserver.o bmtable.o math_symbols.o keybind.o credits.o docu.o \
	menus.o intl.o form1.o credits_form.o layout_forms.o print_form.o \
	figinset.o toolbar.o formula.o math_hash.o math_inset.o \
	math_parser.o math_write.o math_draw.o latex.o texoptions.o table.o \
	buffer.o symgen.o lastfiles.o sp_form.o paths.o \
	math_panel.o lyxrc.o lyxlex.o lyxparameters.o autocor.o combox.o \
	minibuffer.o math_delim.o math_forms.o math_cursor.o

SUBDIRS = clipart layouts doc kbd templates bind examples images

CLIPART = clipart/*.eps

DEFS =  layouts/*.layout layouts/textclass.def

DOC =   doc/*.lyx

KBD =   kbd/*.kmap kbd/*.cdef

TEMPL = templates/*.lyx

BIND = bind/*.bind

lyx: $(OBJS)
	$(CXX) -o lyx $(OBJS) $(LIBS)

all: 	depend lyx

lyx_cb.o: lyx_cb.C
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -DLYX_DIR=\"$(LYX_DIR)\" $<

.C.o: 
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< 

depend: gnudepend

gnudepend:
	sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
	$(CXX) $(CXXCFLAGS) $(CPPFLAGS) -MM $(SRCS) >> tmp_make
	mv tmp_make Makefile

xdepend:
	makedepend $(CPPFLAGS) $(SRCS)

TAGS: $(SRCS)
	$(FIND) . -name "*.[chCH]" -print | $(ETAGS) --c++ -

installdirs:
	$(MKINSTALLDIRS) $(LYX_BINDIR) \
               $(LYX_MANDIR)/man$(MANSUFFIX) \
               $(LYX_DIR)/doc $(LYX_DIR)/layouts \
               $(LYX_DIR)/templates $(LYX_DIR)/kbd \
               $(LYX_DIR)/clipart \
	       $(LYX_DIR)/bind

install:  lyx installdirs
	${INSTALL} lyx $(LYX_BINDIR)/lyx
	${INSTALL} -m 644 system.lyxrc $(LYX_DIR)/system.lyxrc
	${INSTALL} -m 644 CREDITS $(LYX_DIR)/CREDITS
	for i in $(DOC); do \
	   ${INSTALL} -m 644 $$i $(LYX_DIR)/$$i ; \
	done
	for i in $(DEFS); do \
	  ${INSTALL} -m 644 $$i $(LYX_DIR)/$$i ; \
	done
	for i in $(BIND); do \
	  ${INSTALL} -m 644 $$i $(LYX_DIR)/$$i ; \
	done
	for i in $(TEMPL); do \
	  ${INSTALL} -m 644 $$i $(LYX_DIR)/$$i ; \
	done
	for i in $(KBD); do \
	  ${INSTALL} -m 644 $$i $(LYX_DIR)/$$i ; \
	done
	for i in $(CLIPART); do \
	  ${INSTALL} -m 644 $$i $(LYX_DIR)/$$i ; \
	done
	${INSTALL} -m 644 lyx.man $(LYX_MANDIR)/man$(MANSUFFIX)/lyx.$(MANSUFFIX)

clean:
	$(RM) lyx *.o core config.cache config.log

distclean:	clean
	$(RM) config.h config.status Makefile
	for i in . $(SUBDIRS); do \
	  $(RM) *.orig *.rej *~ TAGS *.bak ; \
	done

bindist: lyx
	rm -rf $(bindistdir) 
	$(MKINSTALLDIRS) $(bindistdir)/bin $(bindistdir)/lib/lyx
	strip lyx
	(maindir=`pwd` ; \
	cd $(bindistdir) ; \
	ln -s $$maindir/lyx bin/lyx ; \
	ln -s $$maindir/README README ; \
	test -f $$maindir/README.bin && ln -s $$maindir/README.bin README.bin ; \
	for i in $(SUBDIRS); do \
	  ln -s $$maindir/$$i lib/lyx/$$i ; \
	done ; \
	tar -chf - ./ | gzip >../$(bindistdir).tar.gz )
	rm -rf $(bindistdir) 
	@echo "*** $(bindistdir).tar.gz has been created"

### Dependencies

