1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
# General minimalistic compile file for self contained single
# file babl_extensions
if OS_WIN32
no_undefined = -no-undefined
libbabldlla=$(top_builddir)/babl/.libs/libbabl-$(BABL_API_VERSION).dll.a
endif
CFILES = $(wildcard $(srcdir)/*.c)
SOBJS = $(subst $(srcdir)/,,$(CFILES:.c=$(SHREXT)))
INSTALLED_ITEMS = $(subst $(srcdir),$(ext_dir),$(CFILES:.c=$(SHREXT)))
EXTRA_DIST = $(wildcard *.[ch])
all-local: $(SOBJS)
CFLAGS += \
-I $(top_builddir) \
-I $(top_srcdir) \
-I $(top_srcdir)/babl \
-I $(top_srcdir)/extensions \
-fPIC
LDFLAGS += $(DYNAMICLIB)
if OS_WIN32
LDADD = $(no-undefined) $(libbabldlla) $(MATH_LIB)
else
LDADD = $(top_builddir)/babl/.libs/libbabl-$(BABL_API_VERSION)$(SHREXT) $(MATH_LIB)
endif
%$(SHREXT): %.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
# if extension needing external libraries are to be # compiled with this make
# file, each of them can be added according to the this pattern:
# extra$(SHREXT): extra.c
# $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< [own compile and link flags]
CIE-Lab$(SHREXT): CIE-Lab.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
sse-fixups$(SHREXT): sse-fixups.c
$(CC) $(CFLAGS) $(MMX_EXTRA_CFLAGS) $(SSE_EXTRA_CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
#lcms$(SHREXT): lcms.c
# $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) `pkg-config lcms --cflags --libs`
#############################################################################
clean-local:
rm -f $(SOBJS)
ext_dir = $(DESTDIR)$(libdir)/babl-@BABL_API_VERSION@
install-exec-local: all-local
$(INSTALL) -d $(ext_dir)
$(INSTALL) $(SOBJS) $(ext_dir)
uninstall-local:
rm -f $(INSTALLED_ITEMS)
check-local: all-local
|