1
# Copyright (C) 2009 Artifex Software, Inc.
4
# This software is provided AS-IS with no warranty, either express or
7
# This software is distributed under license and may not be copied, modified
8
# or distributed except as expressly authorized under the terms of that
9
# license. Refer to licensing information at http://www.artifex.com/
10
# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
15
# makefile for the lcms library code.
16
# Users of this makefile must define the following:
17
# SHARE_LCMS - whether to compile in or link to the library
18
# LCMSSRCDIR - the library source directory
20
# gs.mak and friends define the following:
21
# LCSMOBJDIR - the output obj directory
22
# LCMSGENDIR - generated (.dev) file directory
23
# LCMSI_ LCMS_CFLAGS - include and cflags for compiling the lib
25
# We define the lcms.dev target and its dependencies
27
# This partial makefile compiles the lcms library for use in
30
# Define the name of this makefile.
31
LCMS_MAK=$(GLSRC)lcms.mak
33
LCMSSRC=$(LCMSSRCDIR)$(D)src$(D)
34
LCMSGEN=$(LCMSGENDIR)$(D)
35
LCMSOBJ=$(LCMSOBJDIR)$(D)
37
# This makefile was originally written for lcms-1.18.
38
# Other versions may require adjustments to the OBJS list below
41
$(LCMSOBJ)cmscnvrt.$(OBJ) \
42
$(LCMSOBJ)cmserr.$(OBJ) \
43
$(LCMSOBJ)cmsgamma.$(OBJ) \
44
$(LCMSOBJ)cmsgmt.$(OBJ) \
45
$(LCMSOBJ)cmsintrp.$(OBJ) \
46
$(LCMSOBJ)cmsio0.$(OBJ) \
47
$(LCMSOBJ)cmsio1.$(OBJ) \
48
$(LCMSOBJ)cmslut.$(OBJ) \
49
$(LCMSOBJ)cmsmatsh.$(OBJ) \
50
$(LCMSOBJ)cmsmtrx.$(OBJ) \
51
$(LCMSOBJ)cmspack.$(OBJ) \
52
$(LCMSOBJ)cmspcs.$(OBJ) \
53
$(LCMSOBJ)cmswtpnt.$(OBJ) \
54
$(LCMSOBJ)cmsxform.$(OBJ) \
55
$(LCMSOBJ)cmssamp.$(OBJ) \
56
$(LCMSOBJ)cmscam97.$(OBJ) \
57
$(LCMSOBJ)cmsnamed.$(OBJ) \
58
$(LCMSOBJ)cmsps2.$(OBJ) \
59
$(LCMSOBJ)cmscam02.$(OBJ) \
60
$(LCMSOBJ)cmsvirt.$(OBJ) \
61
$(LCMSOBJ)cmscgats.$(OBJ)
63
# use of LCMS_USER_ALLOC avoids the lcms allocator.
65
$(LCMSSRCDIR)$(D)include$(D)lcms.h \
68
lcms.clean : lcms.config-clean lcms.clean-not-config-clean
70
lcms.clean-not-config-clean :
71
$(EXP)$(ECHOGS_XE) $(LCMSSRCDIR) $(LCMSOBJDIR)
75
$(RMN_) $(LCMSGEN)$(D)lcms*.dev
77
LCMSCF_=$(D_)LCMS_USER_ALLOC$(_D_)1$(_D)
79
# NB: we can't use the normal $(CC_) here because msvccmd.mak
80
# adds /Za which conflicts with the lcms source.
81
LCMS_CC=$(CC) $(CFLAGS) $(LCMS_CFLAGS) $(I_)$(GLSRC) $(I_)$(LCMSSRCDIR)$(D)include $(LCMSCF_)
82
LCMSO_=$(O_)$(LCMSOBJ)
84
# switch in the version of lcms.dev we're actually using
85
$(LCMSGEN)lcms.dev : $(TOP_MAKEFILES) $(LCMSGEN)lcms_$(SHARE_LCMS).dev
86
$(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev
88
# dev file for shared (separately built) lcms library
89
$(LCMSGEN)lcms_1.dev : $(TOP_MAKEFILES) $(LCMS_MAK) $(ECHOGS_XE)
90
$(SETMOD) $(LCMSGEN)lcms_1 -lib lcms
92
# dev file for compiling our own from source
93
$(LCMSGEN)lcms_0.dev : $(TOP_MAKEFILES) $(LCMS_MAK) $(ECHOGS_XE) $(lcms_OBJS)
94
$(SETMOD) $(LCMSGEN)lcms_0 $(lcms_OBJS)
96
# explicit rules for building the source files.
98
$(LCMSOBJ)cmscnvrt.$(OBJ) : $(LCMSSRC)cmscnvrt.c $(lcms_HDRS)
99
$(LCMS_CC) $(LCMSO_)cmscnvrt.$(OBJ) $(C_) $(LCMSSRC)cmscnvrt.c
101
$(LCMSOBJ)cmserr.$(OBJ) : $(LCMSSRC)cmserr.c $(lcms_HDRS)
102
$(LCMS_CC) $(LCMSO_)cmserr.$(OBJ) $(C_) $(LCMSSRC)cmserr.c
104
$(LCMSOBJ)cmsgamma.$(OBJ) : $(LCMSSRC)cmsgamma.c $(lcms_HDRS)
105
$(LCMS_CC) $(LCMSO_)cmsgamma.$(OBJ) $(C_) $(LCMSSRC)cmsgamma.c
107
$(LCMSOBJ)cmsgmt.$(OBJ) : $(LCMSSRC)cmsgmt.c $(lcms_HDRS)
108
$(LCMS_CC) $(LCMSO_)cmsgmt.$(OBJ) $(C_) $(LCMSSRC)cmsgmt.c
110
$(LCMSOBJ)cmsintrp.$(OBJ) : $(LCMSSRC)cmsintrp.c $(lcms_HDRS)
111
$(LCMS_CC) $(LCMSO_)cmsintrp.$(OBJ) $(C_) $(LCMSSRC)cmsintrp.c
113
$(LCMSOBJ)cmsio0.$(OBJ) : $(LCMSSRC)cmsio0.c $(lcms_HDRS)
114
$(LCMS_CC) $(LCMSO_)cmsio0.$(OBJ) $(C_) $(LCMSSRC)cmsio0.c
116
$(LCMSOBJ)cmsio1.$(OBJ) : $(LCMSSRC)cmsio1.c $(lcms_HDRS)
117
$(LCMS_CC) $(LCMSO_)cmsio1.$(OBJ) $(C_) $(LCMSSRC)cmsio1.c
119
$(LCMSOBJ)cmslut.$(OBJ) : $(LCMSSRC)cmslut.c $(lcms_HDRS)
120
$(LCMS_CC) $(LCMSO_)cmslut.$(OBJ) $(C_) $(LCMSSRC)cmslut.c
122
$(LCMSOBJ)cmsmatsh.$(OBJ) : $(LCMSSRC)cmsmatsh.c $(lcms_HDRS)
123
$(LCMS_CC) $(LCMSO_)cmsmatsh.$(OBJ) $(C_) $(LCMSSRC)cmsmatsh.c
125
$(LCMSOBJ)cmsmtrx.$(OBJ) : $(LCMSSRC)cmsmtrx.c $(lcms_HDRS)
126
$(LCMS_CC) $(LCMSO_)cmsmtrx.$(OBJ) $(C_) $(LCMSSRC)cmsmtrx.c
128
$(LCMSOBJ)cmspack.$(OBJ) : $(LCMSSRC)cmspack.c $(LCMSSRC)cmsxform.h $(lcms_HDRS)
129
$(LCMS_CC) $(LCMSO_)cmspack.$(OBJ) $(C_) $(LCMSSRC)cmspack.c
131
$(LCMSOBJ)cmspcs.$(OBJ) : $(LCMSSRC)cmspcs.c $(lcms_HDRS)
132
$(LCMS_CC) $(LCMSO_)cmspcs.$(OBJ) $(C_) $(LCMSSRC)cmspcs.c
134
$(LCMSOBJ)cmswtpnt.$(OBJ) : $(LCMSSRC)cmswtpnt.c $(lcms_HDRS)
135
$(LCMS_CC) $(LCMSO_)cmswtpnt.$(OBJ) $(C_) $(LCMSSRC)cmswtpnt.c
137
$(LCMSOBJ)cmsxform.$(OBJ) : $(LCMSSRC)cmsxform.c $(lcms_HDRS)
138
$(LCMS_CC) $(LCMSO_)cmsxform.$(OBJ) $(C_) $(LCMSSRC)cmsxform.c
140
$(LCMSOBJ)cmssamp.$(OBJ) : $(LCMSSRC)cmssamp.c $(lcms_HDRS)
141
$(LCMS_CC) $(LCMSO_)cmssamp.$(OBJ) $(C_) $(LCMSSRC)cmssamp.c
143
$(LCMSOBJ)cmscam97.$(OBJ) : $(LCMSSRC)cmscam97.c $(lcms_HDRS)
144
$(LCMS_CC) $(LCMSO_)cmscam97.$(OBJ) $(C_) $(LCMSSRC)cmscam97.c
146
$(LCMSOBJ)cmsnamed.$(OBJ) : $(LCMSSRC)cmsnamed.c $(lcms_HDRS)
147
$(LCMS_CC) $(LCMSO_)cmsnamed.$(OBJ) $(C_) $(LCMSSRC)cmsnamed.c
149
$(LCMSOBJ)cmsps2.$(OBJ) : $(LCMSSRC)cmsps2.c $(lcms_HDRS)
150
$(LCMS_CC) $(LCMSO_)cmsps2.$(OBJ) $(C_) $(LCMSSRC)cmsps2.c
152
$(LCMSOBJ)cmscam02.$(OBJ) : $(LCMSSRC)cmscam02.c $(lcms_HDRS)
153
$(LCMS_CC) $(LCMSO_)cmscam02.$(OBJ) $(C_) $(LCMSSRC)cmscam02.c
155
$(LCMSOBJ)cmsvirt.$(OBJ) : $(LCMSSRC)cmsvirt.c $(lcms_HDRS)
156
$(LCMS_CC) $(LCMSO_)cmsvirt.$(OBJ) $(C_) $(LCMSSRC)cmsvirt.c
158
$(LCMSOBJ)cmscgats.$(OBJ) : $(LCMSSRC)cmscgats.c $(lcms_HDRS)
159
$(LCMS_CC) $(LCMSO_)cmscgats.$(OBJ) $(C_) $(LCMSSRC)cmscgats.c