xref: /plan9/sys/src/cmd/gs/src/unix-end.mak (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1#    Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises.  All rights reserved.
2#
3# This software is provided AS-IS with no warranty, either express or
4# implied.
5#
6# This software is distributed under license and may not be copied,
7# modified or distributed except as expressly authorized under the terms
8# of the license contained in the file LICENSE in this distribution.
9#
10# For more information about licensing, please refer to
11# http://www.ghostscript.com/licensing/. For information on
12# commercial licensing, go to http://www.artifex.com/licensing/ or
13# contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14# San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15
16# $Id: unix-end.mak,v 1.6 2003/12/11 02:22:11 giles Exp $
17# Partial makefile common to all Unix and Desqview/X configurations.
18# This is the next-to-last part of the makefile for these configurations.
19
20# Define the rule for building standard configurations.
21STDDIRS:
22	@if test ! -d $(BINDIR); then mkdir $(BINDIR); fi
23	@if test ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi
24	@if test ! -d $(GLOBJDIR); then mkdir $(GLOBJDIR); fi
25	@if test ! -d $(PSGENDIR); then mkdir $(PSGENDIR); fi
26	@if test ! -d $(PSOBJDIR); then mkdir $(PSOBJDIR); fi
27
28# Define a rule for building profiling configurations.
29PGDIRS: STDDIRS
30	@if test ! -d $(BINDIR)/$(PGRELDIR); then mkdir $(BINDIR)/$(PGRELDIR); fi
31	@if test ! -d $(GLGENDIR)/$(PGRELDIR); then mkdir $(GLGENDIR)/$(PGRELDIR); fi
32	@if test ! -d $(GLOBJDIR)/$(PGRELDIR); then mkdir $(GLOBJDIR)/$(PGRELDIR); fi
33	@if test ! -d $(PSGENDIR)/$(PGRELDIR); then mkdir $(PSGENDIR)/$(PGRELDIR); fi
34	@if test ! -d $(PSOBJDIR)/$(PGRELDIR); then mkdir $(PSOBJDIR)/$(PGRELDIR); fi
35
36PGDEFS=GENOPT='-DPROFILE' CFLAGS='$(CFLAGS_PROFILE) $(GCFLAGS) $(XCFLAGS)'\
37 LDFLAGS='$(XLDFLAGS) -pg' XLIBS='Xt SM ICE Xext X11'\
38 BINDIR=$(BINDIR)/$(PGRELDIR)\
39 GLGENDIR=$(GLGENDIR)/$(PGRELDIR) GLOBJDIR=$(GLOBJDIR)/$(PGRELDIR)\
40 PSGENDIR=$(PSGENDIR)/$(PGRELDIR) PSOBJDIR=$(PSOBJDIR)/$(PGRELDIR)
41
42pg: PGDIRS
43	$(MAKE) $(PGDEFS) default
44
45pgclean: PGDIRS
46	$(MAKE) $(PGDEFS) clean
47
48# Define a rule for building debugging configurations.
49DEBUGDIRS: STDDIRS
50	@if test ! -d $(BINDIR)/$(DEBUGRELDIR); then mkdir $(BINDIR)/$(DEBUGRELDIR); fi
51	@if test ! -d $(GLGENDIR)/$(DEBUGRELDIR); then mkdir $(GLGENDIR)/$(DEBUGRELDIR); fi
52	@if test ! -d $(GLOBJDIR)/$(DEBUGRELDIR); then mkdir $(GLOBJDIR)/$(DEBUGRELDIR); fi
53	@if test ! -d $(PSGENDIR)/$(DEBUGRELDIR); then mkdir $(PSGENDIR)/$(DEBUGRELDIR); fi
54	@if test ! -d $(PSOBJDIR)/$(DEBUGRELDIR); then mkdir $(PSOBJDIR)/$(DEBUGRELDIR); fi
55
56DEBUGDEFS=GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(GCFLAGS) $(XCFLAGS)'\
57 BINDIR=$(BINDIR)/$(DEBUGRELDIR)\
58 GLGENDIR=$(GLGENDIR)/$(DEBUGRELDIR) GLOBJDIR=$(GLOBJDIR)/$(DEBUGRELDIR)\
59 PSGENDIR=$(PSGENDIR)/$(DEBUGRELDIR) PSOBJDIR=$(PSOBJDIR)/$(DEBUGRELDIR)
60
61debug: DEBUGDIRS
62	$(MAKE) $(DEBUGDEFS) default
63
64debugclean: DEBUGDIRS
65	$(MAKE) $(DEBUGDEFS) clean
66
67# The rule for gconfigv.h is here because it is shared between Unix and
68# DV/X environments.
69$(gconfigv_h): $(GLSRC)unix-end.mak $(TOP_MAKEFILES) $(ECHOGS_XE)
70	$(ECHOGS_XE) -w $(gconfigv_h) -x 23 define USE_ASM -x 2028 -q $(USE_ASM)-0 -x 29
71	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define USE_FPU -x 2028 -q $(FPU_TYPE)-0 -x 29
72	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define EXTEND_NAMES 0$(EXTEND_NAMES)
73	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define SYSTEM_CONSTANTS_ARE_WRITABLE 0$(SYSTEM_CONSTANTS_ARE_WRITABLE)
74
75# Emacs tags maintenance.
76
77TAGS:
78	etags -t $(GLSRC)*.[ch] $(PSSRC)*.[ch]
79