Debian Codegraph @

converter/other/jbig/Makefile

raw
1 ifeq ($(SRCDIR)x,x)
2 SRCDIR = $(CURDIR)/../../..
3 BUILDDIR = $(SRCDIR)
4 endif
5 SUBDIR = converter/other/jbig
6 VPATH=.:$(SRCDIR)/$(SUBDIR)
7
8 SUBDIRS =
9
10 include $(BUILDDIR)/config.mk
11
12 # INTERNAL_JBIGLIB must be relative to the current directory, because it
13 # may end up in MERGE_OBJECTS, which must be relative.
14 INTERNAL_JBIGLIB = libjbig/libjbig.a
15 INTERNAL_JBIGHDR_DIR = $(SRCDIR)/$(SUBDIR)/libjbig/include
16
17 EXTERN_INCLUDES =
18 ifneq ($(JBIGHDR_DIR),NONE)
19 ifneq ($(JBIGHDR_DIR)x,x)
20 EXTERN_INCLUDES += -I$(JBIGHDR_DIR)
21 endif
22 endif
23
24 ifneq ($(JBIGHDR_DIR),NONE)
25 ifneq ($(JBIGLIB),NONE)
26 PORTBINARIES = jbigtopnm pnmtojbig
27 endif
28 endif
29
30 BINARIES = $(PORTBINARIES)
31
32 MERGEBINARIES = $(BINARIES)
33
34 SCRIPTS =
35
36 ifeq ($(JBIGLIB),$(INTERNAL_JBIGLIB))
37 JBIGLIB_DEP = $(JBIGLIB)
38 SUBDIRS += libjbig
39 else
40 # It's not our internal version; user's on his own to make sure it's built
41 endif
42
43 OBJECTS = $(BINARIES:%=%.o)
44 MERGE_OBJECTS = $(BINARIES:%=%.o2)
45
46 all: $(BINARIES)
47
48 include $(SRCDIR)/common.mk
49
50 $(BINARIES): %: %.o $(JBIGLIB_DEP) $(LIBOPT)
51 $(BINARIES): LDFLAGS_TARGET = $(shell $(LIBOPT) $(JBIGLIB))
52
53 $(INTERNAL_JBIGLIB): $(BUILDDIR)/$(SUBDIR)/libjbig FORCE
54 $(MAKE) -f $(SRCDIR)/$(SUBDIR)/libjbig/Makefile \
55 -C $(dir $@) $(notdir $@)
56
57 .PHONY: FORCE
58 FORCE: