Debian Codegraph @

converter/other/jpeg2000/Makefile

raw
1 ifeq ($(SRCDIR)x,x)
2 SRCDIR = $(CURDIR)/../../..
3 BUILDDIR = $(SRCDIR)
4 endif
5 SUBDIR = converter/other/jpeg2000
6 VPATH=.:$(SRCDIR)/$(SUBDIR)
7
8 SUBDIRS =
9
10 include $(BUILDDIR)/config.mk
11
12 EXTERN_INCLUDES =
13
14 # INTERNAL_JASPERLIB must be relative to the current directory, because it
15 # may end up in MERGE_OBJECTS, which must be relative.
16 INTERNAL_JASPERLIB = libjasper/libjasper.a
17 INTERNAL_JASPERHDR_DIR = $(SRCDIR)/$(SUBDIR)/libjasper/include
18
19 ifneq ($(JASPERHDR_DIR),NONE)
20 ifneq ($(JASPERHDR_DIR)x,x)
21 EXTERN_INCLUDES += -I$(JASPERHDR_DIR)
22 endif
23 endif
24
25 ifeq ($(JASPERLIB),$(INTERNAL_JASPERLIB))
26 ifeq ($(HAVE_INT64),Y)
27 JASPERLIB_DEP = $(JASPERLIB)
28 JASPERLIB_USE = $(JASPERLIB)
29 else
30 # He wants the internal library, but doesn't have a 64 bit compiler,
31 # so we have no way to build it. Ergo, he doesn't have a Jasper
32 # library.
33 JASPERLIB_USE = NONE
34 endif
35 else
36 # It's not our internal version; user's on his own to make sure it's built
37 JASPERLIB_USE = $(JASPERLIB)
38 endif
39
40
41 ifneq ($(JASPERHDR_DIR),NONE)
42 ifneq ($(JASPERLIB_USE),NONE)
43 PORTBINARIES = pamtojpeg2k jpeg2ktopam
44 endif
45 endif
46
47 BINARIES = $(PORTBINARIES)
48
49 OBJECTS = $(BINARIES:%=%.o) libjasper_compat.o
50 MERGE_OBJECTS = $(BINARIES:%=%.o2) libjasper_compat.o2
51 ifeq ($(JASPERLIB),$(INTERNAL_JASPERLIB))
52 # MERGE_OBJECTS contains relative paths, so $(INTERNAL_JASPERLIB) had better
53 # be relative to the current directory.
54 MERGE_OBJECTS += $(JASPERLIB)
55 SUBDIRS += libjasper
56 endif
57 MERGEBINARIES = $(BINARIES)
58
59 .PHONY: all
60 all: $(BINARIES)
61
62 include $(SRCDIR)/common.mk
63
64 LIBOPTS = $(shell $(LIBOPT) $(JASPERLIB_USE))
65
66 $(BINARIES): %: %.o libjasper_compat.o $(JASPERLIB_DEP) $(LIBOPT)
67 $(BINARIES): LDFLAGS_TARGET = $(LIBOPTS) $(JASPERDEPLIBS)
68
69 $(INTERNAL_JASPERLIB): $(BUILDDIR)/$(SUBDIR)/libjasper FORCE
70 $(MAKE) -f $(SRCDIR)/$(SUBDIR)/libjasper/Makefile \
71 -C $(dir $@) $(notdir $@)
72
73 .PHONY: FORCE
74 FORCE: