home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
g
/
gs241j11.zip
/
DJGPP.MAK
next >
Wrap
Makefile
|
1992-05-15
|
5KB
|
190 lines
# Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved.
# Distributed by Free Software Foundation, Inc.
#
# This file is part of Ghostscript.
#
# Ghostscript is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
# to anyone for the consequences of using it or for whether it serves any
# particular purpose or works at all, unless he says so in writing. Refer
# to the Ghostscript General Public License for full details.
#
# Everyone is granted permission to copy, modify and redistribute
# Ghostscript, but only under the conditions described in the Ghostscript
# General Public License. A copy of this license is supposed to have been
# given to you along with Ghostscript so you can know your rights and
# responsibilities. It should be in a file named COPYING. Among other
# things, the copyright notice and this notice must be preserved on all
# copies.
# makefile for Ghostscript, MS-DOS 5.0/DJ's GCC configuration.
# Note: this makefile assumes you are using gcc in ANSI mode.
# ------------------------------- Options ------------------------------- #
####### The following are the only parts of the file you should need to edit.
# ------ Generic options ------ #
# Define the default directory/ies for the runtime
# initialization and font files. Separate multiple directories with ;.
# Use / to indicate directories, not a single \.
GS_LIB_DEFAULT=c:/gs;c:/gs/fonts
# Define the name of the Ghostscript initialization file.
# (There is no reason to change this.)
GS_INIT=gs_init.ps
# Choose generic configuration options.
# -DDEBUG
# includes debugging features (-Z switch) in the code.
# Code runs substantially slower even if no debugging switches
# are set.
# -DNOPRIVATE
# makes private (static) procedures and variables public,
# so they are visible to the debugger and profiler.
# No execution time or space penalty.
GENOPT=
# ------ Platform-specific options ------ #
# Define the name of the C compiler.
CC=gcc
# XCFLAGS can be set from the command line.
# We don't include -ansi, because this gets in the way of the platform-
# specific stuff that <math.h> typically needs; nevertheless, we expect
# gcc to accept ANSI-style function prototypes and function definitions.
CFLAGS=-g -O $(XCFLAGS) -DCOMPFONT -DWMODE -DKANJI
# Define platform flags for ld.
# XLDFLAGS can be set from the command line.
LDFLAGS=$(XLDFLAGS)
# Define any extra libraries to link into the executable.
# (Libraries required by individual drivers are handled automatically.)
EXTRALIBS=
# ------ Devices and features ------ #
# Choose the language feature(s) to include. See gs.mak for details.
FEATURE_DEVS=filter.dev dps.dev level2.dev compfont.dev kanji.dev \
kfpc98.dev kfzeit.dev
# Choose the device(s) to include. See devs.mak for details.
DEVICE_DEVS=
# ---------------------------- End of options --------------------------- #
# Define the name of the makefile -- used in dependencies.
MAKEFILE=djgpp.mak
# Define the ANSI-to-K&R dependency. Turbo C accepts ANSI syntax,
# but we need to preconstruct ccf.tr to get around the limit on
# the maximum length of a command line.
AK=ccf.tr
# Define the compilation rules and flags.
CCFLAGS=$(GENOPT) $(CFLAGS)
CCC=$(CC) @ccf.tr -c
# ----------------------------- Generic stuff ----------------------------- #
# Define the platform name.
PLATFORM=djgpp_
# Define the extensions for the object and executable files.
OBJ=o
XE=.exe
# Define the need for uniq.
UNIQ=uniq$(XE)
# Define the current directory prefix, shell quote string, and shell names.
EXP=
QQ=\"
SHELL=
SH=
SHP=
# Define the compilation rules and flags.
.c.o:
$(CCC) $<
CC0=$(CCC)
CCINT=$(CCC)
# -------------------------- Include Makefiles ---------------------------- #
!include "gs.mak" # Borland MAKE specific
!include "devs.mak" # Borland MAKE specific
# -------------------------- Auxiliary programs --------------------------- #
# The dependencies on AK are semi-bogus: AK is null for Turbo C,
# ccf.tr for Turbo/Borland C++.
ansi2knr$(XE): ansi2knr.c $(AK)
$(CC) $(CCFLAGS) -o ansi2knr ansi2knr.c
aout2exe ansi2knr
genarch$(XE): genarch.c $(AK)
$(CC) $(CCFLAGS) -o genarch genarch.c
aout2exe genarch
# We need a substitute for the Unix uniq utility.
# It only has to handle stdin and stdout, no options.
uniq$(XE): uniq.c
$(CC) $(CCFLAGS) -o uniq uniq.c
aout2exe uniq
# -------------------------------- Library -------------------------------- #
# The DJ's GCC platform
djgpp__=gp_djgpp.$(OBJ)
djgpp_.dev: $(djgpp__)
$(SHP)gssetmod djgpp_ $(djgpp__)
gp_djgpp.$(OBJ): gp_djgpp.c $(string__h) $(gx_h) $(gp_h) $(MAKEFILE) makefile
$(CC) $(CCFLAGS) -c gp_djgpp.c
# Build the compiler response file depending on the selected options.
ccf.tr: $(MAKEFILE) makefile
echo -I$(INCDIR) $(CCFLAGS) >ccf.tr
# ----------------------------- Main program ------------------------------ #
# Get around the fact that the DOS shell has a rather small limit on
# the length of a command line. (sigh)
# Interpreter main program
GS_ALL=gs.$(OBJ) gp_djgpp.$(OBJ) $(INT) gsmain.$(OBJ) $(LIB) \
gs_djgpp.tr obj.tr lib.tr
gs$(XE): $(GS_ALL)
$(CC) -o gs @gs_djgpp.tr @obj.tr @lib.tr -lm
aout2exe gs