tinycobol/lib/Makefile.mingw

149 lines
3.5 KiB
Makefile

# Generated automatically from Makefile.in by configure.
#
# Makefile.in for the Tiny COBOL compiler runtime library
#
prefix=/usr/local
exec_prefix=${prefix}
#
# Debug flags are set in htconfig.h
# -DPICTURE_TESTING -DDEBUG_RTS
#
CCX=gcc
ASM=as
INCLUDES=-I/usr/include -I/usr/local/include -I../lib -I..
#CCXFLAGS=${INCLUDES} -g -Wall
#CCXFLAGS1=${INCLUDES} -g -Wall
CCXFLAGS=${INCLUDES} -Wall
CCXFLAGS1=${INCLUDES} -Wall
ACXFLAGS=-D -as
WRES=windres
WRESFLAGS=-O coff
RANLIB=ranlib
AR=ar
#lib_dir=${prefix}/lib
lib_dir=@install_dir@
#INSTRC=${prefix}/share/htcobol
INSTRC=${lib_dir}
RCFILE=htrtconf
#INSTALL=/usr/bin/install -c
INSTALL=install.exe
#INSTALL_DATA=${INSTALL} -m 644
INSTALL_DATA=${INSTALL}
MV = mv -f
RM = rm -f
LNK = ln -sf
MKDIR = mkdir -p
MAKEDEPEND=@MAKEDEPEND@
#
#LIBS=-L/usr/local/lib -lm -ldb -lpdcurses
LIBS=-L/usr/local/lib -L/c/mingw/lib -lm -ldb -lcurses
#
# Default install directory is set in htconfig.h
#
lib_version=@tcob_version@
lib_name1=htcobol
STATIC_LIB1=lib${lib_name1}.a
SHARED_LIB1=${lib_name1}.dll
SHARED_LIB1A=${lib_name1}.dll.a
#SHARED_LIB1=lib${lib_name2}.dll
SRC1 = mcmath.c cobmove.c general.c fileio.c flckclient.c \
pictures.c basicio.c strings.c screenio.c \
cobmove_9_.c cobmove_b_.c cobmove_c_.c cobmove_e_.c \
cobmove_f_.c cobmove_x_.c rterrors.c scr_curses.c intrinsic.c \
dyncall.c config.c
# dycall.c config.c
# dyncall.c ltdl.c config.c
# dyncall.c
SRC2 = htcobolrt.rc
OBJS1 = $(SRC1:.c=.o)
OBJS2 = $(SRC2:.rc=.o)
OBJD1 = $(SRC1:.c=.lo)
OBJD2 = $(SRC2:.rc=.lo)
#
# Rules for compiling .c .s sources
#
.SUFFIX: .c .o .lo
.c.o:
$(CCX) $(CCXFLAGS) -c $<
%.lo: %.c
$(CCX) $(CCXFLAGS1) -c $< -o $@
#
# Notes on building and using the shared htcobol library.
# - The linker will try to use the shared libraries by default.
# If not available it will try to use the static libraries.
# - When linking with a shared htcobol library, all other libraries must be
# named, whether they are used in the cobol program or not.
# (i.e. -lncurses -ldb)
# - To run a cobol program built with a shared htcobol library, and the
# htcobol library is not installed in one of the standard locations, use
# the $LD_LIBRARY_PATH environmental variable to add this path.
# (i.e. export LD_LIBRARY_PATH=this path:$LD_LIBRARY_PATH )
# - For testing purposes, it is recommended that only a static htcobol library
# be used, since gdb will not work properly with shared libraries.
#
all: static-libs
devel: static-libs shared-libs
static-libs: ${STATIC_LIB1}
shared-libs: ${SHARED_LIB1}
# Rules for building the DLL resources
#
htcobolrt.o: htcobolrt.rc
$(WRES) $(WRESFLAGS) $< $@
# Rules for building the static library
#
${STATIC_LIB1}: ${OBJS1}
${AR} cr ${STATIC_LIB1} ${OBJS1}
${RANLIB} ${STATIC_LIB1}
# Rules for building the shared library
#
${SHARED_LIB1}: ${OBJS1} $(OBJS2)
${CCX} -shared -Wl,--out-implib,${lib_name1}.dll.a,--output-def,${lib_name1}.def -o ${SHARED_LIB1} $(OBJS1) $(OBJS2) ${LIBS}
clean:
@${RM} ${OBJS} ${STATIC_LIB1} \
${SHARED_LIB1} ${SHARED_LIB1}.a \
core *.bak *.o *.lo
install: install-dir install-static install-shared install-rts-config
install-rts-config:
# $(MKDIR) $(INSTRC)
${INSTALL_DATA} $(RCFILE) $(INSTRC)/$(RCFILE)
install-static: ${STATIC_LIB1}
# ${INSTALL_DATA} ${STATIC_LIB1} ${lib_dir}/${STATIC_LIB1}
install-shared: ${SHARED_LIB1}
${INSTALL_DATA} ${SHARED_LIB1} ${lib_dir}/${SHARED_LIB1}
# ${INSTALL_DATA} ${SHARED_LIB1A} ${lib_dir}/${SHARED_LIB1A}
install-dir:
$(MKDIR) $(INSTRC)