| 1 |
# This is common rules for the libjasper subdirectories. |
| 2 |
# |
| 3 |
# Set the following variables before including this: |
| 4 |
# |
| 5 |
# SUBDIRS: Subdirectory names |
| 6 |
# LIB_OBJECTS: List of object files from this directory that go into |
| 7 |
# libjasper. |
| 8 |
# JASPERSRCDIR: libjasper source directory |
| 9 |
|
| 10 |
all: $(LIB_OBJECTS) partlist |
| 11 |
|
| 12 |
partlist: $(SUBDIRS:%=%/partlist) |
| 13 |
cat /dev/null $(SUBDIRS:%=%/partlist) >$@ |
| 14 |
echo $(LIB_OBJECTS:%=$(CURDIR)/%) >>$@ |
| 15 |
|
| 16 |
$(SUBDIRS:%=%/partlist): |
| 17 |
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \ |
| 18 |
SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@) |
| 19 |
|
| 20 |
include $(SRCDIR)/common.mk |
| 21 |
|
| 22 |
INCLUDES := -I$(JASPERSRCDIR)/include $(INCLUDES) |
| 23 |
|
| 24 |
DEFS = -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STDDEF_H=1 -DEXCLUDE_BMP_SUPPORT -DEXCLUDE_RAS_SUPPORT -DEXCLUDE_MIF_SUPPORT -DEXCLUDE_JPG_SUPPORT -DEXCLUDE_PGX_SUPPORT -DEXCLUDE_PNM_SUPPORT |
| 25 |
|
| 26 |
$(LIB_OBJECTS):%.o:%.c |
| 27 |
$(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS_ALL) $< |
| 28 |
|
| 29 |
$(LIB_OBJECTS): importinc |
| 30 |
|
| 31 |
thisdirclean: localclean |
| 32 |
|
| 33 |
.PHONY: localclean |
| 34 |
localclean: |
| 35 |
rm -f partlist |
| 36 |
|
| 37 |
.PHONY: FORCE |
| 38 |
FORCE: |