📄 gs.mak
字号:
# always updated).
# RM_ - the command for deleting (a) file(s) (including wild cards,
# but limited to a single file or pattern).
# RMN_ = the command for deleting multiple files / patterns.
#
# The platform-specific makefiles must also include rules for creating
# certain dynamically generated files:
# gconfig_.h - this indicates the presence or absence of
# certain system header files that are located in different
# places on different systems. (It could be generated by
# the GNU `configure' program.)
# gconfigv.h - this indicates the status of certain machine-
# and configuration-specific features derived from definitions
# in the platform-specific makefile.
#**************** PATCHES
JGENDIR=$(GLGENDIR)
JOBJDIR=$(GLOBJDIR)
PNGGENDIR=$(GLGENDIR)
PNGOBJDIR=$(GLOBJDIR)
ZGENDIR=$(GLGENDIR)
ZOBJDIR=$(GLOBJDIR)
GLSRC=$(GLSRCDIR)$(D)
GLGEN=$(GLGENDIR)$(D)
GLOBJ=$(GLOBJDIR)$(D)
#**************** END PATCHES
# Define the name of this makefile.
GS_MAK=$(GLSRC)gs.mak
# Define the names of the executables.
GS_XE=$(GLOBJ)$(GS)$(XE)
AUXGENDIR=$(GLGENDIR)
AUXGEN=$(AUXGENDIR)$(D)
ANSI2KNR_XE=$(AUXGEN)ansi2knr$(XEAUX)
ECHOGS_XE=$(AUXGEN)echogs$(XEAUX)
GENARCH_XE=$(AUXGEN)genarch$(XEAUX)
GENCONF_XE=$(AUXGEN)genconf$(XEAUX)
GENDEV_XE=$(AUXGEN)gendev$(XEAUX)
GENINIT_XE=$(AUXGEN)geninit$(XEAUX)
# Define the names of the CONFIG-dependent header files.
# gconfig*.h and gconfx*.h are generated dynamically.
gconfig_h=$(GLGEN)gconfxx$(CONFIG).h
gconfigf_h=$(GLGEN)gconfxc$(CONFIG).h
# Watcom make insists that rules have a non-empty body!
all default: $(GS_XE)
$(RM_) _temp_*
distclean maintainer-clean realclean: clean
$(RM_) makefile
clean: mostlyclean
$(RM_) $(GLGEN)arch.h
$(RM_) $(GS_XE)
#****** FOLLOWING IS WRONG, NEEDS TO BE PER-SUBSYSTEM ******
mostlyclean: config-clean
$(RMN_) $(GLOBJ)*.$(OBJ) $(GLOBJ)*.a $(GLOBJ)core $(GLOBJ)gmon.out
$(RMN_) $(GLGEN)deflate.h $(GLGEN)zutil.h
$(RMN_) $(GLGEN)gconfig*.c $(GLGEN)gscdefs*.c $(GLGEN)iconfig*.c
$(RMN_) $(GLGEN)_temp_* $(GLGEN)_temp_*.* $(GLOBJ)*.map $(GLOBJ)*.sym
$(RMN_) $(ANSI2KNR_XE) $(ECHOGS_XE)
$(RMN_) $(GENARCH_XE) $(GENCONF_XE) $(GENDEV_XE) $(GENINIT_XE)
$(RMN_) $(GLGEN)gs_init.c $(BEGINFILES)
# Remove only configuration-dependent information.
#****** FOLLOWING IS WRONG, NEEDS TO BE PER-SUBSYSTEM ******
#****** rm *.dev IS WRONG ******
config-clean:
$(RMN_) *.dev
$(RMN_) $(GLGEN)*.dev $(GLGEN)devs*.tr $(GLGEN)gconfig*.h
$(RMN_) $(GLGEN)gconfx*.h $(GLGEN)j*.h
$(RMN_) $(GLGEN)c*.tr $(GLGEN)o*.tr $(GLGEN)l*.tr
# A rule to do a quick and dirty compilation attempt when first installing
# the interpreter. Many of the compilations will fail:
# follow this with 'make'.
#****** FOLLOWING IS WRONG, TIED TO INTERPRETER ******
begin:
$(RMN_) $(GLGEN)arch.h $(GLGEN)gconfig*.h $(GLGEN)gconfx*.h
$(RMN_) $(GENARCH_XE) $(GS_XE)
$(RMN_) $(GLGEN)gconfig*.c $(GLGEN)gscdefs*.c $(GLGEN)iconfig*.c
$(RMN_) $(GLGEN)gs_init.c $(BEGINFILES)
make $(GLGEN)arch.h $(GLGEN)gconfigv.h
- $(CCBEGIN)
$(RMN_) $(GLOBJ)gconfig.$(OBJ) $(GLOBJ)gdev*.$(OBJ)
$(RMN_) $(GLOBJ)gp_*.$(OBJ) $(GLOBJ)gscdefs.$(OBJ) $(GLOBJ)gsmisc.$(OBJ)
$(RMN_) $(PSOBJ)icfontab.$(OBJ) $(PSOBJ)iconfig.$(OBJ)
$(RMN_) $(PSOBJ)iinit.$(OBJ) $(PSOBJ)interp.$(OBJ)
# Macros for constructing the *.dev files that describe features and
# devices.
SETDEV=$(ECHOGS_XE) -e .dev -w- -l-dev -F -s -l-obj
SETPDEV=$(ECHOGS_XE) -e .dev -w- -l-dev -F -s -l-include -lpage -l-obj
SETDEV2=$(ECHOGS_XE) -e .dev -w- -l-dev2 -F -s -l-obj
SETPDEV2=$(ECHOGS_XE) -e .dev -w- -l-dev2 -F -s -l-include -lpage -l-obj
SETMOD=$(ECHOGS_XE) -e .dev -w- -l-obj
ADDMOD=$(ECHOGS_XE) -e .dev -a-
# Define the search lists and compilation switches for the third-party
# libraries. The search lists must be enclosed in $(I_) and $(_I).
# Note that we can't define the entire compilation command,
# because this must include $(GLSRCDIR), which isn't defined yet.
JI_=$(JSRCDIR)
JF_=
PI_=$(PSRCDIR) $(II)$(ZSRCDIR)
# PF_ should include PNG_USE_CONST, but this doesn't work.
#PF_=-DPNG_USE_CONST
PF_=
ZI_=$(ZSRCDIR)
ZF_=
######################## How to define new 'features' #######################
#
# One defines new 'features' exactly like devices (see devs.mak for details).
# For example, one would define a feature abc by adding the following to
# gs.mak:
#
# abc_=abc1.$(OBJ) ...
# abc.dev: $(GS_MAK) $(ECHOGS_XE) $(abc_)
# $(SETMOD) abc $(abc_)
# $(ADDMOD) abc -obj ... [if needed]
# $(ADDMOD) abc -oper ... [if appropriate]
# $(ADDMOD) abc -ps ... [if appropriate]
#
# If the abc feature requires the presence of some other features jkl and
# pqr, then the rules must look like this:
#
# abc_=abc1.$(OBJ) ...
# abc.dev: $(GS_MAK) $(ECHOGS_XE) $(abc_) jkl.dev pqr.dev
# $(SETMOD) abc $(abc_)
# ...
# $(ADDMOD) abc -include jkl pqr
# --------------------- Configuration-dependent files --------------------- #
# gconfig.h shouldn't have to depend on DEVS_ALL, but that would
# involve rewriting gsconfig to only save the device name, not the
# contents of the <device>.dev files.
# FEATURE_DEVS must precede DEVICE_DEVS so that devices can override
# features in obscure cases.
DEVS_ALL=$(PLATFORM).dev $(FEATURE_DEVS) \
$(DEVICE_DEVS) $(DEVICE_DEVS1) \
$(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5) \
$(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) \
$(DEVICE_DEVS10) $(DEVICE_DEVS11) $(DEVICE_DEVS12) $(DEVICE_DEVS13) \
$(DEVICE_DEVS14) $(DEVICE_DEVS15)
devs_tr=$(GLGEN)devs.tr$(CONFIG)
$(devs_tr): $(GS_MAK) $(MAKEFILE) $(ECHOGS_XE)
$(ECHOGS_XE) -w $(devs_tr) - -include $(PLATFORM).dev
$(ECHOGS_XE) -a $(devs_tr) - $(FEATURE_DEVS)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS1)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS2)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS3)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS4)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS5)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS6)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS7)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS8)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS9)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS10)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS11)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS12)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS13)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS14)
$(ECHOGS_XE) -a $(devs_tr) - $(DEVICE_DEVS15)
# GCONFIG_EXTRAS can be set on the command line.
# Note that it consists of arguments for echogs, i.e.,
# it isn't just literal text.
GCONFIG_EXTRAS=
ld_tr=$(GLGEN)ld$(CONFIG).tr
$(gconfig_h) $(ld_tr) $(GLGEN)lib.tr: \
$(GS_MAK) $(MAKEFILE) $(GLSRC)version.mak $(GENCONF_XE) $(ECHOGS_XE) $(devs_tr) $(DEVS_ALL) libcore.dev
$(GENCONF_XE) $(devs_tr) libcore.dev -h $(gconfig_h) $(CONFILES) $(CONFLDTR) $(ld_tr)
$(ECHOGS_XE) -a $(gconfig_h) -x 23 define -s -u GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22
$(ECHOGS_XE) -a $(gconfig_h) -x 23 define -s -u SEARCH_HERE_FIRST -s $(SEARCH_HERE_FIRST)
$(ECHOGS_XE) -a $(gconfig_h) -x 23 define -s -u GS_DOCDIR -x 2022 $(GS_DOCDIR) -x 22
$(ECHOGS_XE) -a $(gconfig_h) -x 23 define -s -u GS_INIT -x 2022 $(GS_INIT) -x 22
$(ECHOGS_XE) -a $(gconfig_h) -x 23 define -s -u GS_REVISION -s $(GS_REVISION)
$(ECHOGS_XE) -a $(gconfig_h) -x 23 define -s -u GS_REVISIONDATE -s $(GS_REVISIONDATE)
$(ECHOGS_XE) -a $(gconfig_h) $(GCONFIG_EXTRAS)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -