#
#  REFERENCES -- bibliographic software
#  Copyright (C) 1995-2000  Volker Kiefel
#
#  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  
#  USA
#
#  ----------------------------------------------------------------------
#
#  REFERENCES 3.6 -- MAKEFILE for DMAKE.EXE -- Version for GCC+EMX
#
#  Instructions for DJGPP see below.
#
#  GCC (version 2.7.2.1 or 2.8.1)
#
#  EMX--VERSION (DMAKE by Dennis Vadura, Version 3.80):
#
#  Compile at the DOS prompt with 
#
#       DMAKE 
#
#  To delete the .o-files, call
#
#       DMAKE cleanup
#
#  For further information on DMAKE please refer to documentation in
#  `DMAKE.MAN'
#
#  Compiled Version may be used under DOS with EMX-options `-acm -p' (1).
#  E. Mattes' EMX.EXE (2) is required.
#
#  For Windows 3.1, Windows 95, Windows 98, Windows NT, RSX.EXE (3) is
#  required.
#
#  (1) Enter `SET EMXOPT=-acm -p' at the DOS prompt or include it into
#      the calling batch file or include it into the AUTOEXEC.BAT file.
#
#  (2) The program may localize EMX.EXE with the EMX environment
#      variable: `SET EMX=[PATH_TO_EMX.EXE]', e. g.
#      `SET EMX=C:/REFS36/BIN/EMX.EXE'.
#
#  (3) The program may localize RSX.EXE with the RSX environment
#      variable: `SET RSX=[PATH_TO_RSX.EXE]'
#
#      The program expects no long filenames under Windows 95/98
#      The ability of RSX.EXE to recognize long filenames is disabled
#      with the value `N' assigned to the environment variable 'LFN':
#      `SET LFN=N'
#
#  ------------------------------------------------------------------
#
#  EMX--ANSI.SYS VERSION
#
#  A version which works with ANSI.SYS may be compiled with the
#  MIT_ANSI_SYS macro defined. The executable file can be linked
#  without the video library. Use the line:
#
#      CFLAGS=-c -Wall -DMIT_ANSI_SYS
#
#  instead of
#
#      CFLAGS=-c -Wall
#
#  for compilation and
#
#      $(CLINKER) @refs.lnk -o refsemx/refs36.exe
#
#  instead of
#
#      $(CLINKER) @refs.lnk  -lvideo -o refsemx/refs36.exe
#
#  for linking
#
#  Run the ANSI.SYS--Version:
#
#  (1) Enter `SET EMXOPT=-p' at the DOS prompt or include it into
#      the calling batch file or include it into the AUTOEXEC.BAT file.
#
#  ==================================================================
#
#  DJGPP--Versions:
#
#  To compile REFERENCES under DJGPP (version 2.02) please run MAKEMAKE.BAT
#  to create MAKEFILE.DJ. This batch file requires that "awk" is available on
#  your system (the "gawk" implementation of the AWK-language works perfect!)
#  and requires the AWK-script `m.awk'.  Before compiling/linking please
#  create the REFSDJ subdirectory for refs36.exe. The program author used GNU
#  MAKE version 3.77.
#
#  Compile at the DOS prompt with 
#
#       MAKE -f MAKEFILE.DJ
#
#  To delete the .o-files, call
#
#       MAKE -f MAKEFILE.DJ cleanup 
#
#

# Please uncomment the pertinent lines for the EMX/DJGPP versions


# Uncomment this line to compile the EMX and DJGPP versions:
CFLAGS=-c -Wall

# Uncomment this line to compile the EMX and DJGPP ANSI.SYS version:
# CFLAGS=-c -Wall -DMIT_ANSI_SYS

CC=gcc $(CFLAGS)

# Link the EMX and DJGPP versions `verbose': uncomment the following line
LFLAGS=-v

# Uncomment the following line for linking the EMX (not ANSI.SYS) version
# LILIBS=-lvideo 

CLINKER=gcc $(LFLAGS)

ODATS=*.O

refsemx/refs36.exe : refsmenu.o  \
	txt2tex.o  \
	refs2tex.o  \
	list_kj.o  \
	list_abs.o  \
	srtf.o  \
	xtrrm.o  \
	fil_fun.o  \
	drec_fun.o  \
	vtxt.o  \
	file_mg.o  \
	abst_fun.o  \
	rfd1_fun.o  \
	rfd_fun.o  \
	f_ver.o  \
	stru_fun.o  \
	transf.o  \
	expo_fun.o  \
	list_fun.o  \
	list_rfd.o  \
	btch_fun.o  \
	search.o  \
	bbf_fun.o  \
	sortfd.o  \
	sortbbf1.o  \
	sortbbf2.o  \
	re_edit.o  \
	re_brow.o  \
	key_fun.o  \
	src_fun.o  \
	ix01_fun.o  \
	ix02_fun.o  \
	ix03_fun.o  \
	ix04_fun.o  \
	sortix01.o  \
	sortix02.o  \
	sortix03.o  \
	sortix04.o  \
	re_fun.o  \
	rfnr_fun.o  \
	str_refs.o  \
	f1_fun.o  \
	fl_ut.o  \
	cfg_fun.o  \
	l_menu.o  \
	str_fun.o  \
	abbruch.o \
	medl_arr.o
	$(CLINKER) @refs.lnk  $(LILIBS) -o refsemx/refs36.exe

refsmenu.o : refsmenu.c abbruch.h fl_ut.h str_fun.h l_menu.h cfg_fun.h \
        refs.h abstr.h fd.h rglobal.h vtxt.h keycodes.h
	$(CC) refsmenu.c

txt2tex.o : txt2tex.c str_fun.h fl_ut.h abbruch.h cfg_fun.h l_menu.h
	$(CC) txt2tex.c

refs2tex.o : refs2tex.c str_fun.h l_menu.h fl_ut.h abbruch.h cfg_fun.h
	$(CC) refs2tex.c

list_kj.o :  list_kj.c fl_ut.h str_fun.h ix02_fun.h ix03_fun.h \
	l_menu.h abbruch.h cfg_fun.h
	$(CC) list_kj.c

list_abs.o :  list_abs.c refs.h keycodes.h fl_ut.h abstr.h str_refs.h \
	ix04_fun.h str_fun.h l_menu.h abbruch.h cfg_fun.h
	$(CC) list_abs.c


srtf.o :      srtf.c str_fun.h fl_ut.h abbruch.h refs.h l_menu.h \
	cfg_fun.h srtf.h
	$(CC) srtf.c

xtrrm.o :     xtrrm.c str_fun.h fl_ut.h abbruch.h refs.h l_menu.h \
	cfg_fun.h str_refs.h xtrrm.h keycodes.h
	$(CC) xtrrm.c

fil_fun.o :   fil_fun.c ix01_fun.h ix04_fun.h fl_ut.h l_menu.h \
	str_fun.h fil_fun.h sortix01.h sortix04.h abbruch.h \
	cfg_fun.h keycodes.h
	$(CC) fil_fun.c

drec_fun.o :  drec_fun.c ix01_fun.h ix04_fun.h fl_ut.h l_menu.h \
	str_fun.h sortix01.h sortix04.h abbruch.h bbf_fun.h \
	sortbbf1.h cfg_fun.h
	$(CC) drec_fun.c

vtxt.o :      vtxt.c refs.h keycodes.h cfg_fun.h l_menu.h abbruch.h \
	str_fun.h vtxt.h
	$(CC) vtxt.c

file_mg.o :   file_mg.c str_fun.h fl_ut.h l_menu.h cfg_fun.h keycodes.h
	$(CC) file_mg.c

abst_fun.o :  abst_fun.c refs.h abstr.h fl_ut.h l_menu.h str_fun.h \
	abbruch.h keycodes.h ix01_fun.h ix04_fun.h sortix04.h \
	rfnr_fun.h cfg_fun.h
	$(CC) abst_fun.c

rfd1_fun.o :  rfd1_fun.c rfd1_fun.h fd.h refs.h abbruch.h rfd_fun.h \
	l_menu.h fl_ut.h str_fun.h
	$(CC) rfd1_fun.c

rfd_fun.o :   rfd_fun.c l_menu.h str_fun.h keycodes.h fd.h refs.h \
	rfd_fun.h rfd1_fun.h fl_ut.h sortfd.h abbruch.h \
	cfg_fun.h
	$(CC) rfd_fun.c

f_ver.o :     f_ver.c refs.h abstr.h str_fun.h fl_ut.h ix01_fun.h \
	ix02_fun.h ix03_fun.h ix04_fun.h abbruch.h cfg_fun.h \
	l_menu.h fd.h
	$(CC) f_ver.c

stru_fun.o :  stru_fun.c refs.h abstr.h str_fun.h fl_ut.h \
	ix01_fun.h sortix01.h ix02_fun.h sortix02.h \
	ix03_fun.h sortix03.h ix04_fun.h sortix04.h \
	l_menu.h abbruch.h keycodes.h cfg_fun.h
	$(CC) stru_fun.c

transf.o :    transf.c refs.h abstr.h str_fun.h fl_ut.h \
	ix01_fun.h sortix01.h ix02_fun.h sortix02.h \
	ix03_fun.h sortix03.h ix04_fun.h sortix04.h \
	abbruch.h cfg_fun.h l_menu.h
	$(CC) transf.c

expo_fun.o :  expo_fun.c refs.h abstr.h keycodes.h ix01_fun.h ix02_fun.h \
	ix03_fun.h ix04_fun.h fl_ut.h str_fun.h l_menu.h \
	bbf_fun.h sortbbf1.h abbruch.h cfg_fun.h
	$(CC) expo_fun.c

list_fun.o :  list_fun.c refs.h keycodes.h ix01_fun.h ix02_fun.h \
	fl_ut.h str_fun.h l_menu.h str_refs.h abbruch.h \
	cfg_fun.h
	$(CC) list_fun.c

list_rfd.o :  list_rfd.c refs.h keycodes.h ix01_fun.h ix02_fun.h fl_ut.h \
	str_fun.h l_menu.h str_refs.h fd.h list_rfd.h abbruch.h \
	cfg_fun.h
	$(CC) list_rfd.c

btch_fun.o :  btch_fun.c refs.h str_fun.h fl_ut.h ix01_fun.h sortbbf1.h \
	l_menu.h sortbbf2.h bbf_fun.h keycodes.h abbruch.h  \
	cfg_fun.h
	$(CC) btch_fun.c

search.o :    search.c refs.h search.h str_fun.h fl_ut.h ix01_fun.h \
	sortbbf1.h l_menu.h sortbbf2.h  bbf_fun.h abbruch.h \
	cfg_fun.h keycodes.h vtxt.h
	$(CC) search.c

bbf_fun.o :   bbf_fun.c refs.h str_fun.h fl_ut.h bbf_fun.h abbruch.h \
	l_menu.h
	$(CC) bbf_fun.c


sortfd.o :    sortfd.c sortfd.h fd.h str_fun.h fl_ut.h refs.h abbruch.h \
	l_menu.h
	$(CC) sortfd.c

sortbbf1.o :  sortbbf1.c sortbbf1.h refs.h str_fun.h fl_ut.h abbruch.h \
	l_menu.h
	$(CC) sortbbf1.c

sortbbf2.o :  sortbbf2.c sortbbf2.h refs.h str_fun.h fl_ut.h abbruch.h \
	l_menu.h
	$(CC) sortbbf2.c

re_edit.o :   re_edit.c cfg_fun.h re_edit.h refs.h ix01_fun.h ix02_fun.h \
	sortix01.h fl_ut.h str_fun.h l_menu.h src_fun.h key_fun.h \
	str_refs.h re_fun.h rfnr_fun.h abbruch.h vtxt.h keycodes.h
	$(CC) re_edit.c

re_brow.o :   re_brow.c re_brow.h refs.h ix01_fun.h ix02_fun.h ix04_fun.h \
	fl_ut.h str_fun.h l_menu.h str_refs.h re_fun.h abbruch.h \
	rfnr_fun.h keycodes.h cfg_fun.h vtxt.h
	$(CC) re_brow.c

key_fun.o :   key_fun.c str_fun.h ix03_fun.h l_menu.h fl_ut.h key_fun.h \
	abbruch.h keycodes.h
	$(CC) key_fun.c

src_fun.o :   src_fun.c str_fun.h ix02_fun.h fl_ut.h src_fun.h \
	l_menu.h abbruch.h keycodes.h
	$(CC) src_fun.c

ix01_fun.o :  ix01_fun.c refs.h ix01_fun.h abbruch.h l_menu.h fl_ut.h
	$(CC) ix01_fun.c

ix02_fun.o :  ix02_fun.c refs.h ix02_fun.h str_fun.h abbruch.h fl_ut.h \
	l_menu.h
	$(CC) ix02_fun.c

ix03_fun.o :  ix03_fun.c refs.h ix03_fun.h str_fun.h abbruch.h fl_ut.h \
	l_menu.h
	$(CC) ix03_fun.c

ix04_fun.o :  ix04_fun.c abstr.h refs.h ix04_fun.h str_fun.h \
	abbruch.h fl_ut.h l_menu.h
	$(CC) ix04_fun.c

sortix01.o :  sortix01.c sortix01.h refs.h str_fun.h fl_ut.h abbruch.h \
	l_menu.h
	$(CC) sortix01.c

sortix02.o :  sortix02.c sortix02.h refs.h str_fun.h fl_ut.h abbruch.h  \
	l_menu.h
	$(CC) sortix02.c

sortix03.o :  sortix03.c sortix03.h refs.h str_fun.h fl_ut.h abbruch.h \
	l_menu.h
	$(CC) sortix03.c

sortix04.o :  sortix04.c sortix04.h abstr.h refs.h str_fun.h fl_ut.h \
	abbruch.h l_menu.h
	$(CC) sortix04.c

re_fun.o :    re_fun.c refs.h abstr.h abbruch.h fl_ut.h str_fun.h \
	re_fun.h str_refs.h src_fun.h l_menu.h
	$(CC) re_fun.c

rfnr_fun.o :  rfnr_fun.c rfnr_fun.h str_fun.h refs.h keycodes.h \
	l_menu.h
	$(CC) rfnr_fun.c

str_refs.o :  str_refs.c str_fun.h keycodes.h l_menu.h str_refs.h
	$(CC) str_refs.c

f1_fun.o :    f1_fun.c fl_ut.h f1_fun.h refs.h l_menu.h str_fun.h \
	cfg_fun.h vtxt.h
	$(CC) f1_fun.c

fl_ut.o :     fl_ut.c refs.h l_menu.h str_fun.h fl_ut.h abbruch.h \
	keycodes.h
	$(CC) fl_ut.c

cfg_fun.o :   cfg_fun.c refs.h cfg_fun.h abbruch.h str_fun.h  \
	fl_ut.h
	$(CC) cfg_fun.c

l_menu.o :    l_menu.c l_menu.h keycodes.h str_fun.h cfg_fun.h refs.h
	$(CC) l_menu.c

str_fun.o :   str_fun.c l_menu.h str_fun.h refs.h
	$(CC) str_fun.c

abbruch.o :   abbruch.c abbruch.h str_fun.h l_menu.h
	$(CC) abbruch.c

medl_arr.o :  medl_arr.c medl_arr.h str_fun.h keycodes.h fl_ut.h refs.h \
	l_menu.h cfg_fun.h abbruch.h str_refs.h rfnr_fun.h
	$(CC) medl_arr.c



cleanup :
	del $(ODATS)
