8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-27 17:23:03 +01:00
firebird-mirror/src/makefiles/sfx.gpre

191 lines
6.7 KiB
Plaintext
Raw Normal View History

# The contents of this file are subject to the Interbase Public
# License Version 1.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy
# of the License at http://www.Inprise.com/IPL.html
#
# Software distributed under the License is distributed on an
# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
# or implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code was created by Inprise Corporation
# and its predecessors. Portions created by Inprise Corporation are
# Copyright (C) Inprise Corporation.
#
# All Rights Reserved.
# Contributor(s): ______________________________________.
@SET_MAKE@
OBJS= objs
SOURCE= source
srcdir= source/gpre
VPATH= source/gpre
CXX= @CXX@
GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT)
GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT)
GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT)
GPRE_FLAGS= -r -m -z -n
CXX_INCLUDE_DIRS= -I. -Isource/jrd
NODE_LINK=
DSC_LINK= $(OBJS)/jrd/dsc.o
JRD_LINK= $(NODE_LINK) $(DSC_LINK)
BOOT= $(OBJS)/jrd/gds_boot.a
GPRE_BOOT_OBJECTS= cmd.o cme.o cmp.o c_cxx.o exp.o gpre.o hsh.o int.o \
int_cxx.o jrdmet.o movg.o gpre_meta_boot.o msc.o par.o pat.o pretty.o sqe.o \
sql.o noform.o $(OBJS)/jrd/dsc.o $(OBJS)/jrd/gds.o \
$(OBJS)/jrd/isc_ipc.o $(OBJS)/jrd/isc.o $(OBJS)/jrd/dls.o
GPRE_OBJECTS= cmd.o cme.o cmp.o c_cxx.o exp.o gpre.o hsh.o int.o int_cxx.o \
jrdmet.o movg.o gpre_meta.o msc.o par.o pat.o pretty.o sqe.o sql.o \
$(LANG_OBJECTS)
all: gpre$(EXEC_EXT)
# JMB / DARWIN dsc.o (dsc.bin) already in shared lib. Removed link with
# $(DSC_LINK)
gpre: gprelib.a $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) $(JRD_LINK) \
$(GDSSHR)
-$(RM) gpre
$(CC) $(LINK_OPTS) gprelib.a $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) \
$(T_SWITCH) $(NODE_LINK) $(T_SWITCH) \
-o gpre $(GDSSHR_LINK) $(CURSES_LIB)
$(CHMOD_7) gpre
$(MV) gpre $(GPRE)
$(TOUCH) gpre
$(CHMOD_6) gpre
$(GPRE_STATIC) gpre_static gpre/gpre_static: override LANG_OBJECTS=
$(GPRE_STATIC): \
gprelib.a $(OBJS)/jrd/jrd_static.a noform.o
-$(RM) gpre_static
$(CXX) $(LINK_OPTS) gprelib.a noform.o \
$(T_SWITCH) $(NODE_LINK) $(T_SWITCH) $(OBJS)/jrd/jrd_static.a \
$(COREFOUNDATION_LINK) \
-o gpre $(CURSES_LIB) $(DROP_LINK)
$(CHMOD_7) gpre
$(MV) gpre $(OBJS)/firebird/bin/gpre_static
$(TOUCH) gpre_static
$(CHMOD_6) gpre_static
gpre.exe: gprelib.lib $(JRD_LINK)
-$(RM) gpre.exe
$(CC) $(LINK_OPTS) $(O_EXE_SWITCH)gpre \
$(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) $(JRD_LINK) $(GDSSHR_LINK)
$(MV) gpre.exe $(GPRE)
$(RM) gpre.exe
$(TOUCH) gpre.exe
gprelib.a: $(GPRE_OBJECTS)
-$(RM) gprelib.a
$(AR) gprelib.a $(GPRE_OBJECTS)
-ranlib gprelib.a
$(CHMOD_6) gprelib.a
gprelib.lib: $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS)
-$(RM) gprelib.lib
$(IMPLIB) -out:gprelib.lib $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS)
$(TOUCH) gprelib.lib
$(GPRE_BOOT): $(GPRE_BOOT_OBJECTS)
$(CXX) -framework Foundation $(GPRE_BOOT_OBJECTS) \
$(T_SWITCH) $(NODE_LINK) $(T_SWITCH) \
-o $(GPRE_BOOT) $(CURSES_LIB)
#gpre_boot: $(GPRE_OBJECTS) no_form.o $(JRD_LINK) $(BOOT)
# $(CC) $(LINK_OPTS) $(GPRE_OBJECTS) noform.o $(JRD_LINK) -o gpre $(BOOT)
# $(MV) gpre $(GPRE)
debug: $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) $(GDSLIB)
$(CC) $(LINK_OPTS) -g $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) -o gpre_dbg $(GDSLIB_LINK)
debug_nt: $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS)
$(CC) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)gpre_dbg $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) $(GDSLIB_LINK)
ada.o: ada.cpp gpre.h form.h pat.h gpre_proto.h prett_proto.h \
$(SOURCE)/jrd/gds_proto.h
bas.o: bas.cpp gpre.h form.h pat.h
blrtable.o: blrtable.cpp
cmd.o: cmd.cpp gpre.h $(SOURCE)/jrd/flags.h
cme.o: cme.cpp gpre.h $(SOURCE)/jrd/intl.h
cmp.o: cmp.cpp gpre.h form.h
cob.o: cob.cpp gpre.h form.h pat.h
cxx.o: cxx.cpp gpre.h form.h pat.h
c_cxx.o: c_cxx.cpp gpre.h form.h pat.h
dyntable.o: dyntable.cpp
exp.o: exp.cpp gpre.h parse.h form.h
form.o: form.cpp gpre.h form.h $(SOURCE)/pyxis/phase1.h
form_trn.o: form_trn.cpp $(SOURCE)/jrd/dsc.h
ftn.o: ftn.cpp gpre.h form.h pat.h
gen.o: gen.cpp gpre.h form.h pat.h
gpre.h: $(SOURCE)/jrd/dsc.h
# $(TOUCH) gpre.h
gpre.o: gpre.cpp gpre.h $(SOURCE)/jrd/license.h parse.h $(SOURCE)/jrd/intl.h
hsh.o: hsh.cpp gpre.h parse.h hsh.h
int.o: int.cpp gpre.h
int_cxx.o: int_cxx.cpp gpre.h
jrdmet.o: jrdmet.cpp gpre.h $(SOURCE)/jrd/val.h $(SOURCE)/jrd/names.h \
$(SOURCE)/jrd/fields.h $(SOURCE)/jrd/relations.h $(SOURCE)/jrd/types.h \
$(SOURCE)/intl/charsets.h $(SOURCE)/intl/country_codes.h \
$(SOURCE)/jrd/constants.h
gpre_meta.cpp: gpre_meta.epp
$(GPRE_BOOT) -lang_internal $(GPRE_FLAGS) $< $@
gpre_meta.o: gpre_meta.cpp gpre.h $(SOURCE)/jrd/license.h parse.h $(SOURCE)/jrd/intl.h
movg.o: movg.cpp
msc.o: msc.cpp gpre.h parse.h
no_ada.o: no_ada.cpp gpre.h form.h
no_form.o: no_form.cpp gpre.h form.h $(SOURCE)/pyxis/phase1.h
par.o: par.cpp gpre.h parse.h form.h
parse.h: words.h
$(TOUCH) parse.h
pas.o: pas.cpp gpre.h form.h pat.h
pat.o: pat.cpp gpre.h form.h pat.h
pli.o: pli.cpp gpre.h form.h pat.h
pretty.o: pretty.cpp dyntable.h cdbtable.h sdltable.h
sqe.o: sqe.cpp gpre.h parse.h
sql.o: sql.cpp gpre.h parse.h $(SOURCE)/jrd/intl.h $(SOURCE)/wal/wal.h \
$(SOURCE)/jrd/flags.h
vms_print.o: vms_print.cpp gpre.h
$(OBJS)/jrd/%:
$(CD) $(OBJS)/jrd && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)
$(GDSSHR): force
$(CD) $(OBJS)/jrd && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)
# This entry is used to programatically update the include file dependencies
# for all *.c files in the current directory.
#
# Note that it is specific to Solaris by using the -xM1 compiler option.
# This option has CC generate dependency lines for the makefile - but
# does not generate object files.
# It is likely that a similar option exists on other platforms.
#
# It is recommended that depends.mak be created on a platform
# that supports such an option. depends.mak is not platform dependent, it uses
# the standard makefile output format, as can be copied to platforms
# that don't have a -xM1 feature in the c compiler.
#
depends.mak:
-$(RM) depends.out
-$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out
-$(RM) depends.mak
$(ECHO) "# depends.mak - gpre" > depends.mak
$(ECHO) "# Created by 'make depends.mak'" >> depends.mak
date "+# Created on %Y-%m-%d" >> depends.mak
sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/gpre/::g"\
depends.out |sort|uniq >> depends.mak
-$(RM) depends.out
# In the event that a platform does not support the make directive "include" -
# concatenate "depends.mak" with the makefile.
#
include depends.mak
force: