summaryrefslogtreecommitdiff
path: root/base/lcms2.mak
blob: 5f8bc8bd1f45b2ab89f57767d5099dc3baadb9c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# Copyright (C) 2001-2023 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
# implied.
#
# This software is distributed under license and may not be copied,
# modified or distributed except as expressly authorized under the terms
# of the license contained in the file LICENSE in this distribution.
#
# Refer to licensing information at http://www.artifex.com or contact
# Artifex Software, Inc.,  39 Mesa Street, Suite 108A, San Francisco,
# CA 94129, USA, for further information.
#

# makefile for the lcms library code.
# Users of this makefile must define the following:
#	SHARE_LCMS - whether to compile in or link to the library
#	LCMS2SRCDIR - the library source directory
#
# gs.mak and friends define the following:
#	LCMS2OBJDIR - the output obj directory
#	LCMS2GENDIR - generated (.dev) file directory
#	LCMS2I_ LCMS2_CFLAGS - include and cflags for compiling the lib

# We define the lcms2.dev target and its dependencies
#
# This partial makefile compiles the lcms library for use in
# Ghostscript.

# Define the name of this makefile.
LCMS2_MAK=$(GLSRC)lcms2.mak $(TOP_MAKEFILES)

LCMS2SRC=$(LCMS2SRCDIR)$(D)src$(D)
LCMS2GEN=$(LCMS2GENDIR)$(D)
LCMS2OBJ=$(LCMS2OBJDIR)$(D)

# This makefile was is targetted at lcms-2.1 (stolen from the one
# for lcms1.18 and tweaked).
# Other versions may require adjustments to the OBJS list below

lcms2_OBJS=\
	$(LCMS2OBJ)cmscam02.$(OBJ) \
	$(LCMS2OBJ)cmscgats.$(OBJ) \
	$(LCMS2OBJ)cmscnvrt.$(OBJ) \
	$(LCMS2OBJ)cmserr.$(OBJ) \
	$(LCMS2OBJ)cmsgamma.$(OBJ) \
	$(LCMS2OBJ)cmsgmt.$(OBJ) \
	$(LCMS2OBJ)cmshalf.$(OBJ) \
	$(LCMS2OBJ)cmsintrp.$(OBJ) \
	$(LCMS2OBJ)cmsio0.$(OBJ) \
	$(LCMS2OBJ)cmsio1.$(OBJ) \
	$(LCMS2OBJ)cmslut.$(OBJ) \
	$(LCMS2OBJ)cmsmd5.$(OBJ) \
	$(LCMS2OBJ)cmsmtrx.$(OBJ) \
	$(LCMS2OBJ)cmsnamed.$(OBJ) \
	$(LCMS2OBJ)cmsopt.$(OBJ) \
	$(LCMS2OBJ)cmspack.$(OBJ) \
	$(LCMS2OBJ)cmspcs.$(OBJ) \
	$(LCMS2OBJ)cmsplugin.$(OBJ) \
	$(LCMS2OBJ)cmsps2.$(OBJ) \
	$(LCMS2OBJ)cmssamp.$(OBJ) \
	$(LCMS2OBJ)cmstypes.$(OBJ) \
	$(LCMS2OBJ)cmsvirt.$(OBJ) \
	$(LCMS2OBJ)cmswtpnt.$(OBJ) \
	$(LCMS2OBJ)cmsxform.$(OBJ) \
	$(LCMS2OBJ)cmsalpha.$(OBJ)

LCMS2_DEPS=\
        $(LCMS2SRCDIR)$(D)include$(D)lcms2.h \
	$(GLSRC)icc34.h $(LCMS2_MAK) $(MAKEDIRS)

lcms2.clean : lcms2.config-clean lcms2.clean-not-config-clean

lcms2.clean-not-config-clean :
	$(EXP)$(ECHOGS_XE) $(LCMS2SRCDIR) $(LCMS2OBJDIR)
	$(RM_) $(lcms2_OBJS)

lcms2.config-clean :
	$(RMN_) $(LCMS2GEN)$(D)lcms2*.dev

# NB: we can't use the normal $(CC_) here because msvccmd.mak
# adds /Za which conflicts with the lcms source.
LCMS2_CC=$(CC) $(D_)SHARE_LCMS=$(SHARE_LCMS)$(_D) $(CFLAGS) $(LCMS2_CFLAGS) $(I_)$(LCMS2SRCDIR)$(D)include $(LCMS2CF_)
LCMS2O_=$(O_)$(LCMS2OBJ)

# switch in the version of lcms2.dev we're actually using
$(LCMS2GEN)lcms2.dev : $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(MAKEDIRS)
	$(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev

# dev file for shared (separately built) lcms library
$(LCMS2GEN)lcms2_1.dev : $(LCMS2_MAK) $(ECHOGS_XE) $(MAKEDIRS)
	$(SETMOD) $(LCMS2GEN)lcms2_1 -lib lcms2

# dev file for compiling our own from source
$(LCMS2GEN)lcms2_0.dev : $(LCMS2_MAK) $(ECHOGS_XE) $(lcms2_OBJS) $(LCMS2_DEPS)
	$(SETMOD) $(LCMS2GEN)lcms2_0 $(lcms2_OBJS)

# explicit rules for building the source files.

$(LCMS2OBJ)cmscam02.$(OBJ) : $(LCMS2SRC)cmscam02.c $(LCMS2_DEPS)
	$(LCMS2_CC) $(LCMS2O_)cmscam02.$(OBJ) $(C_) $(LCMS2SRC)cmscam02.c

$(LCMS2OBJ)cmscgats.$(OBJ) : $(LCMS2SRC)cmscgats.c $(LCMS2_DEPS)
	$(LCMS2_CC) $(LCMS2O_)cmscgats.$(OBJ) $(C_) $(LCMS2SRC)cmscgats.c

$(LCMS2OBJ)cmscnvrt.$(OBJ) : $(LCMS2SRC)cmscnvrt.c $(LCMS2_DEPS)
	$(LCMS2_CC) $(LCMS2O_)cmscnvrt.$(OBJ) $(C_) $(LCMS2SRC)cmscnvrt.c

$(LCMS2OBJ)cmserr.$(OBJ) : $(LCMS2SRC)cmserr.c $(LCMS2_DEPS)
	$(LCMS2_CC) $(LCMS2O_)cmserr.$(OBJ) $(C_) $(LCMS2SRC)cmserr.c

$(LCMS2OBJ)cmsgamma.$(OBJ) : $(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