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_LCMS2 - whether to compile in or link to the library
18
# LCMS2SRCDIR - the library source directory
20
# gs.mak and friends define the following:
21
# LCMS2OBJDIR - the output obj directory
22
# LCMS2GENDIR - generated (.dev) file directory
23
# LCMS2I_ LCMS2_CFLAGS - include and cflags for compiling the lib
25
# We define the lcms2.dev target and its dependencies
27
# This partial makefile compiles the lcms library for use in
30
# Define the name of this makefile.
31
LCMS2_MAK=$(GLSRC)lcms2.mak
33
LCMS2SRC=$(LCMS2SRCDIR)$(D)src$(D)
34
LCMS2GEN=$(LCMS2GENDIR)$(D)
35
LCMS2OBJ=$(LCMS2OBJDIR)$(D)
37
# This makefile was is targetted at lcms-2.1 (stolen from the one
38
# for lcms1.18 and tweaked).
39
# Other versions may require adjustments to the OBJS list below
42
$(LCMS2OBJ)cmscam02.$(OBJ) \
43
$(LCMS2OBJ)cmscgats.$(OBJ) \
44
$(LCMS2OBJ)cmscnvrt.$(OBJ) \
45
$(LCMS2OBJ)cmserr.$(OBJ) \
46
$(LCMS2OBJ)cmsgamma.$(OBJ) \
47
$(LCMS2OBJ)cmsgmt.$(OBJ) \
48
$(LCMS2OBJ)cmsintrp.$(OBJ) \
49
$(LCMS2OBJ)cmsio0.$(OBJ) \
50
$(LCMS2OBJ)cmsio1.$(OBJ) \
51
$(LCMS2OBJ)cmslut.$(OBJ) \
52
$(LCMS2OBJ)cmsmd5.$(OBJ) \
53
$(LCMS2OBJ)cmsmtrx.$(OBJ) \
54
$(LCMS2OBJ)cmsnamed.$(OBJ) \
55
$(LCMS2OBJ)cmsopt.$(OBJ) \
56
$(LCMS2OBJ)cmspack.$(OBJ) \
57
$(LCMS2OBJ)cmspcs.$(OBJ) \
58
$(LCMS2OBJ)cmsplugin.$(OBJ) \
59
$(LCMS2OBJ)cmsps2.$(OBJ) \
60
$(LCMS2OBJ)cmssamp.$(OBJ) \
61
$(LCMS2OBJ)cmstypes.$(OBJ) \
62
$(LCMS2OBJ)cmsvirt.$(OBJ) \
63
$(LCMS2OBJ)cmswtpnt.$(OBJ) \
64
$(LCMS2OBJ)cmsxform.$(OBJ)
67
$(LCMS2SRCDIR)$(D)include$(D)lcms2.h \
70
lcms2.clean : lcms2.config-clean lcms2.clean-not-config-clean
72
lcms2.clean-not-config-clean :
73
$(EXP)$(ECHOGS_XE) $(LCMS2SRCDIR) $(LCMS2OBJDIR)
77
$(RMN_) $(LCMS2GEN)$(D)lcms2*.dev
79
# NB: we can't use the normal $(CC_) here because msvccmd.mak
80
# adds /Za which conflicts with the lcms source.
81
LCMS2_CC=$(CC) $(CFLAGS) $(LCMS2_CFLAGS) $(I_)$(LCMS2SRCDIR)$(D)include $(LCMS2CF_)
82
LCMS2O_=$(O_)$(LCMS2OBJ)
84
# switch in the version of lcms2.dev we're actually using
85
$(LCMS2GEN)lcms2.dev : $(TOP_MAKEFILES) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev
86
$(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev
88
# dev file for shared (separately built) lcms library
89
$(LCMS2GEN)lcms2_1.dev : $(TOP_MAKEFILES) $(LCMS2_MAK) $(ECHOGS_XE)
90
$(SETMOD) $(LCMS2GEN)lcms2_1 -lib lcms2
92
# dev file for compiling our own from source
93
$(LCMS2GEN)lcms2_0.dev : $(TOP_MAKEFILES) $(LCMS2_MAK) $(ECHOGS_XE) $(lcms2_OBJS)
94
$(SETMOD) $(LCMS2GEN)lcms2_0 $(lcms2_OBJS)
96
# explicit rules for building the source files.
98
$(LCMS2OBJ)cmscam02.$(OBJ) : $(LCMS2SRC)cmscam02.c $(lcms2_HDRS)
99
$(LCMS2_CC) $(LCMS2O_)cmscam02.$(OBJ) $(C_) $(LCMS2SRC)cmscam02.c
101
$(LCMS2OBJ)cmscgats.$(OBJ) : $(LCMS2SRC)cmscgats.c $(lcms2_HDRS)
102
$(LCMS2_CC) $(LCMS2O_)cmscgats.$(OBJ) $(C_) $(LCMS2SRC)cmscgats.c
104
$(LCMS2OBJ)cmscnvrt.$(OBJ) : $(LCMS2SRC)cmscnvrt.c $(lcms2_HDRS)
105
$(LCMS2_CC) $(LCMS2O_)cmscnvrt.$(OBJ) $(C_) $(LCMS2SRC)cmscnvrt.c
107
$(LCMS2OBJ)cmserr.$(OBJ) : $(LCMS2SRC)cmserr.c $(lcms2_HDRS)
108
$(LCMS2_CC) $(LCMS2O_)cmserr.$(OBJ) $(C_) $(LCMS2SRC)cmserr.c
110
$(LCMS2OBJ)cmsgamma.$(OBJ) : $(LCMS2SRC)cmsgamma.c $(lcms2_HDRS)
111
$(LCMS2_CC) $(LCMS2O_)cmsgamma.$(OBJ) $(C_) $(LCMS2SRC)cmsgamma.c
113
$(LCMS2OBJ)cmsgmt.$(OBJ) : $(LCMS2SRC)cmsgmt.c $(lcms2_HDRS)
114
$(LCMS2_CC) $(LCMS2O_)cmsgmt.$(OBJ) $(C_) $(LCMS2SRC)cmsgmt.c
116
$(LCMS2OBJ)cmsintrp.$(OBJ) : $(LCMS2SRC)cmsintrp.c $(lcms2_HDRS)
117
$(LCMS2_CC) $(LCMS2O_)cmsintrp.$(OBJ) $(C_) $(LCMS2SRC)cmsintrp.c
119
$(LCMS2OBJ)cmsio0.$(OBJ) : $(LCMS2SRC)cmsio0.c $(lcms2_HDRS)
120
$(LCMS2_CC) $(LCMS2O_)cmsio0.$(OBJ) $(C_) $(LCMS2SRC)cmsio0.c
122
$(LCMS2OBJ)cmsio1.$(OBJ) : $(LCMS2SRC)cmsio1.c $(lcms2_HDRS)
123
$(LCMS2_CC) $(LCMS2O_)cmsio1.$(OBJ) $(C_) $(LCMS2SRC)cmsio1.c
125
$(LCMS2OBJ)cmslut.$(OBJ) : $(LCMS2SRC)cmslut.c $(lcms2_HDRS)
126
$(LCMS2_CC) $(LCMS2O_)cmslut.$(OBJ) $(C_) $(LCMS2SRC)cmslut.c
128
$(LCMS2OBJ)cmsmd5.$(OBJ) : $(LCMS2SRC)cmsmd5.c $(lcms2_HDRS)
129
$(LCMS2_CC) $(LCMS2O_)cmsmd5.$(OBJ) $(C_) $(LCMS2SRC)cmsmd5.c
131
$(LCMS2OBJ)cmsmtrx.$(OBJ) : $(LCMS2SRC)cmsmtrx.c $(lcms2_HDRS)
132
$(LCMS2_CC) $(LCMS2O_)cmsmtrx.$(OBJ) $(C_) $(LCMS2SRC)cmsmtrx.c
134
$(LCMS2OBJ)cmsnamed.$(OBJ) : $(LCMS2SRC)cmsnamed.c $(lcms2_HDRS)
135
$(LCMS2_CC) $(LCMS2O_)cmsnamed.$(OBJ) $(C_) $(LCMS2SRC)cmsnamed.c
137
$(LCMS2OBJ)cmsopt.$(OBJ) : $(LCMS2SRC)cmsopt.c $(lcms2_HDRS)
138
$(LCMS2_CC) $(LCMS2O_)cmsopt.$(OBJ) $(C_) $(LCMS2SRC)cmsopt.c
140
$(LCMS2OBJ)cmspack.$(OBJ) : $(LCMS2SRC)cmspack.c $(lcms2_HDRS)
141
$(LCMS2_CC) $(LCMS2O_)cmspack.$(OBJ) $(C_) $(LCMS2SRC)cmspack.c
143
$(LCMS2OBJ)cmspcs.$(OBJ) : $(LCMS2SRC)cmspcs.c $(lcms2_HDRS)
144
$(LCMS2_CC) $(LCMS2O_)cmspcs.$(OBJ) $(C_) $(LCMS2SRC)cmspcs.c
146
$(LCMS2OBJ)cmsplugin.$(OBJ) : $(LCMS2SRC)cmsplugin.c $(lcms2_HDRS)
147
$(LCMS2_CC) $(LCMS2O_)cmsplugin.$(OBJ) $(C_) $(LCMS2SRC)cmsplugin.c
149
$(LCMS2OBJ)cmsps2.$(OBJ) : $(LCMS2SRC)cmsps2.c $(lcms2_HDRS)
150
$(LCMS2_CC) $(LCMS2O_)cmsps2.$(OBJ) $(C_) $(LCMS2SRC)cmsps2.c
152
$(LCMS2OBJ)cmssamp.$(OBJ) : $(LCMS2SRC)cmssamp.c $(lcms2_HDRS)
153
$(LCMS2_CC) $(LCMS2O_)cmssamp.$(OBJ) $(C_) $(LCMS2SRC)cmssamp.c
155
$(LCMS2OBJ)cmstypes.$(OBJ) : $(LCMS2SRC)cmstypes.c $(lcms2_HDRS)
156
$(LCMS2_CC) $(LCMS2O_)cmstypes.$(OBJ) $(C_) $(LCMS2SRC)cmstypes.c
158
$(LCMS2OBJ)cmswtpnt.$(OBJ) : $(LCMS2SRC)cmswtpnt.c $(lcms2_HDRS)
159
$(LCMS2_CC) $(LCMS2O_)cmswtpnt.$(OBJ) $(C_) $(LCMS2SRC)cmswtpnt.c
161
$(LCMS2OBJ)cmsvirt.$(OBJ) : $(LCMS2SRC)cmsvirt.c $(lcms2_HDRS)
162
$(LCMS2_CC) $(LCMS2O_)cmsvirt.$(OBJ) $(C_) $(LCMS2SRC)cmsvirt.c
164
$(LCMS2OBJ)cmsxform.$(OBJ) : $(LCMS2SRC)cmsxform.c $(LCMS2SRC)cmsxform.h $(lcms2_HDRS)
165
$(LCMS2_CC) $(LCMS2O_)cmsxform.$(OBJ) $(C_) $(LCMS2SRC)cmsxform.c