xref: /plan9/sys/src/cmd/gs/src/watclib.mak (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1#    Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999, 2000 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: watclib.mak,v 1.24 2004/12/10 23:48:48 giles Exp $
17# makefile for MS-DOS / Watcom C/C++ library testing.
18
19libdefault: $(GLOBJ)gslib.exe
20	$(NO_OP)
21
22AROOTDIR=c:/gs
23GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION)
24GS_DOCDIR=$(GSROOTDIR)/doc
25GS_LIB_DEFAULT=$(GSROOTDIR)/lib\;$(GSROOTDIR)/resource\;$(AROOTDIR)/fonts
26SEARCH_HERE_FIRST=1
27GS_INIT=gs_init.ps
28
29!ifndef DEBUG
30DEBUG=1
31!endif
32!ifndef TDEBUG
33TDEBUG=1
34!endif
35!ifndef NOPRIVATE
36NOPRIVATE=1
37!endif
38
39GS=gslib
40
41!ifndef BINDIR
42BINDIR=.\debugobj
43!endif
44!ifndef GLSRCDIR
45GLSRCDIR=.\src
46!endif
47!ifndef GLGENDIR
48GLGENDIR=.\debugobj
49!endif
50!ifndef GLOBJDIR
51GLOBJDIR=.\debugobj
52!endif
53
54# Do not edit the next group of lines.
55NUL=
56DD=$(GLGENDIR)\$(NUL)
57GLD=$(GLGENDIR)\$(NUL)
58
59!ifndef JSRCDIR
60JSRCDIR=jpeg
61!endif
62!ifndef JVERSION
63JVERSION=6
64!endif
65
66!ifndef PSRCDIR
67PSRCDIR=libpng
68!endif
69!ifndef PVERSION
70PVERSION=10208
71!endif
72
73!ifndef ZSRCDIR
74ZSRCDIR=zlib
75!endif
76
77# Define the jbig2dec library source location.
78# See jbig2.mak for more information.
79
80!ifndef JBIG2SRCDIR
81JBIG2SRCDIR=jbig2dec
82!endif
83
84# Define the directory where the icclib source are stored.
85# See icclib.mak for more information
86
87!ifndef ICCSRCDIR
88ICCSRCDIR=icclib
89!endif
90
91# Define the directory where the ijs source is stored,
92# and the process forking method to use for the server.
93# See ijs.mak for more information.
94
95!ifndef IJSSRCDIR
96IJSSRCDIR=ijs
97IJSEXECTYPE=win
98!endif
99
100CFLAGS=
101
102!ifndef WCVERSION
103WCVERSION=10.0
104!endif
105LIBPATHS=LIBPATH $(%WATCOM)\lib386 LIBPATH $(%WATCOM)\lib386\dos
106STUB=$(%WATCOM)\binb\wstub.exe
107
108!ifndef CPU_TYPE
109CPU_TYPE=386
110!endif
111!ifndef FPU_TYPE
112FPU_TYPE=0
113!endif
114
115!ifndef SYNC
116SYNC=winsync
117!endif
118
119PLATFORM=watclib_
120MAKEFILE=$(GLSRCDIR)\watclib.mak
121TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)\wccommon.mak
122PLATOPT=
123
124!include $(GLSRCDIR)\wccommon.mak
125
126!ifndef FEATURE_DEVS
127FEATURE_DEVS=$(GLD)patlib.dev $(GLD)path1lib.dev
128!endif
129!ifndef DEVICE_DEVS
130DEVICE_DEVS=$(DD)vga.dev
131!endif
132!ifndef COMPILE_INITS
133COMPILE_INITS=0
134!endif
135!ifndef BAND_LIST_STORAGE
136BAND_LIST_STORAGE=file
137!endif
138!ifndef BAND_LIST_COMPRESSOR
139BAND_LIST_COMPRESSOR=zlib
140!endif
141!ifndef FILE_IMPLEMENTATION
142FILE_IMPLEMENTATION=stdio
143!endif
144!ifndef STDIO_IMPLEMENTATION
145STDIO_IMPLEMENTATION=
146!endif
147
148!include $(GLSRCDIR)\wctail.mak
149!include $(GLSRCDIR)\devs.mak
150!include $(GLSRCDIR)\contrib.mak
151
152GLCCWIN=$(GLCC)
153!include $(GLSRCDIR)\winplat.mak
154
155watclib_1=$(GLOBJ)gp_getnv.$(OBJ) $(GLOBJ)gp_iwatc.$(OBJ)
156!ifeq WAT32 0
157watclib_2=$(GLOBJ)gp_dosfs.$(OBJ) $(GLOBJ)gp_dosfe.$(OBJ) $(GLOBJ)gp_msdos.$(OBJ)
158watclib_inc=
159!else
160watclib_2=
161watclib_inc=$(GLD)winplat.dev
162!endif
163watclib__=$(watclib_1) $(watclib_2)
164$(GLGEN)watclib_.dev: $(watclib__) $(GLGEN)nosync.dev $(watclib_inc)
165	$(SETMOD) $(GLGEN)watclib_ $(watclib_1)
166	$(ADDMOD) $(GLGEN)watclib_ -obj $(watclib_2)
167	$(ADDMOD) $(GLGEN)watclib_ -include $(GLGEN)nosync $(watclib_inc)
168
169$(GLOBJ)gp_iwatc.$(OBJ): $(GLSRC)gp_iwatc.c $(stat__h) $(string__h)\
170 $(gx_h) $(gp_h) $(gpmisc_h)
171	$(GLCC) $(GLO_)gp_iwatc.$(OBJ) $(C_) $(GLSRC)gp_iwatc.c
172
173BEGINFILES=*.err
174
175LIB_ONLY=$(GLOBJ)gslib.obj $(GLOBJ)gsnogc.obj $(GLOBJ)gconfig.obj $(GLOBJ)gscdefs.obj
176ll_tr=ll.tr
177$(ll_tr): $(TOP_MAKEFILES)
178	echo OPTION STACK=64k >$(ll_tr)
179!ifeq WAT32 0
180	echo SYSTEM DOS4G >>$(ll_tr)
181	echo OPTION STUB=$(STUB) >>$(ll_tr)
182!endif
183	echo FILE $(GLOBJ)gsnogc.obj >>$(ll_tr)
184	echo FILE $(GLOBJ)gconfig.obj >>$(ll_tr)
185	echo FILE $(GLOBJ)gscdefs.obj >>$(ll_tr)
186
187$(GLOBJ)gslib.exe: $(LIB_ALL) $(LIB_ONLY) $(ld_tr) $(ll_tr)
188	$(LINK) $(LCT) NAME gslib OPTION MAP=gslib FILE $(GLOBJ)gslib @$(ld_tr) @$(ll_tr)
189