# Copyright (C) 2006 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 that # license. Refer to licensing information at http://www.artifex.com/ # or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, # San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. # # $Id$ # makefile for Luratech lwf_jp2 library code. # Users of this makefile must define the following: # SHARE_JPX - whether to compile in or link to the library # JPXSRCDIR - the library source directory # # gs.mak and friends define the following: # JPXOBJDIR - the output obj directory # JPXGENDIR - generated (.dev) file directory # JPX_OPENJPEG_I_ - include path for the library headers # JPXCF_ - cflags for building the library # # We define the openjpeg.dev target and its dependencies # # This partial makefile compiles the openjpeg library for use in # Ghostscript. OPEN_JPEG_MAK=$(GLSRC)openjpeg.mak OPEN_JPEG_SRC=$(JPXSRCDIR)$(D)libopenjpeg$(D) OPEN_JPEG_GEN=$(JPXOBJDIR)$(D) OPEN_JPEG_PREFIX=opj_ OPEN_JPEG_OBJ=$(JPXOBJDIR)$(D) OPEN_JPEG_CONFIG_H=$(OPEN_JPEG_GEN)opj_config.h # source files to build from the CSDK source open_jpeg_OBJS = \ $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)bio.$(OBJ) \ $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)cio.$(OBJ) \ $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)dwt.$(OBJ) \ $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)event.$(OBJ) \ $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)image.$(OBJ) \ $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)j2k.$(OBJ) \ $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)j2k_lib.$(OBJ) \ $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)jp2.$(OBJ) \ $(OPEN_JPEG_OBJ)$(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_MAKEFILES) $(JPXSRCDIR)$(D)opj_config.h.in.user $(CP_) $(JPXSRCDIR)$(D)opj_config.h.in.user $(OPEN_JPEG_CONFIG_H) # switch in the selected library .dev $(OPEN_JPEG_GEN)openjpeg.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev # external link .dev $(OPEN_JPEG_GEN)openjpeg_1.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) $(ECHOGS_XE) $(SETMOD) $(OPEN_JPEG_GEN)openjpeg_1 -lib lib_openjpeg # compile our own .dev $(OPEN_JPEG_GEN)openjpeg_0.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) $(ECHOGS_XE) $(open_jpeg_OBJS) $(SETMOD) $(OPEN_JPEG_GEN)openjpeg_0 $(open_jpeg_OBJS) # define our specific compiler OPEN_JPEG_CC=$(CC) $(CFLAGS) $(D_)OPJ_STATIC$(_D) $(I_)$(OPEN_JPEG_GEN)$(_I) $(I_)$(JPX_OPENJPEG_I_)$(_I) $(I_)$(JPX_OPENJPEG_I_)$(D)..$(_I) $(JPXCF_) OPEN_JPEG_O=$(O_)$(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX) OPEN_JPEG_DEP=$(AK) $(OPEN_JPEG_MAK) # explicit rules for building each source file # for simplicity we have every source file depend on all headers $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)bio.$(OBJ) : $(OPEN_JPEG_SRC)bio.c $(OPEN_JPEG_DEP) $(open_jpeg_HDRS) $(OPEN_JPEG_CONFIG_H) $(OPEN_JPEG_CC) $(OPEN_JPEG_O)bio.$(OBJ) $(C_) $(OPEN_JPEG_SRC)bio.c $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)cio.$(OBJ) : $(OPEN_JPEG_SRC)cio.c $(OPEN_JPEG_DEP) $(open_jpeg_HDRS) $(OPEN_JPEG_CONFIG_H) $(OPEN_JPEG_CC) $(OPEN_JPEG_O)cio.$(OBJ) $(C_) $(OPEN_JPEG_SRC)cio.c $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)dwt.$(OBJ) : $(OPEN_JPEG_SRC)dwt.c $(OPEN_JPEG_DEP) $(open_jpeg_HDRS) $(OPEN_JPEG_CONFIG_H) $(OPEN_JPEG_CC) $(OPEN_JPEG_O)dwt.$(OBJ) $(C_) $(OPEN_JPEG_SRC)dwt.c $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)event.$(OBJ) : $(OPEN_JPEG_SRC)event.c $(OPEN_JPEG_DEP) $(open_jpeg_HDRS) $(OPEN_JPEG_CONFIG_H) $(OPEN_JPEG_CC) $(OPEN_JPEG_O)event.$(OBJ) $(C_) $(OPEN_JPEG_SRC)event.c $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)image.$(OBJ) : $(OPEN_JPEG_SRC)image.c $(OPEN_JPEG_DEP) $(open_jpeg_HDRS) $(OPEN_JPEG_CONFIG_H) $(OPEN_JPEG_CC) $(OPEN_JPEG_O)image.$(OBJ) $(C_) $(OPEN_JPEG_SRC)image.c $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)j2k.$(OBJ) : $(OPEN_JPEG_SRC)j2k.c $(OPEN_JPEG_DEP) $(open_jpeg_HDRS) $(OPEN_JPEG_CONFIG_H) $(OPEN_JPEG_CC) $(OPEN_JPEG_O)j2k.$(OBJ) $(C_) $(OPEN_JPEG_SRC)j2k.c $(OPEN_JPEG_OBJ)$(OPEN_JPEG_PREFIX)j2k_lib.$(OBJ) : $(OPEN_JPEG_SRC)j2k_lib.c $(OPEN_JPEG_DEP) $(open_jpeg_HDRS) $(OPEN_JPEG_CONFIG_H) $(OPEN_JPEG_CC) $(OPEN_JPEG_O)j2k_lib.$(OBJ) $(C_) $(OPEN_JPEG_SRC)j2k_lib.c $(OPEN_JPEG_OBJ)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