summaryrefslogtreecommitdiff
path: root/operations/Makefile-operations.am
blob: 5d8c673d8fde075078a8a49f928ed5ba16263b74 (plain)
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
include $(top_srcdir)/operations/Makefile-common.am

LIBS            = $(op_libs)

CFILES          = $(wildcard $(srcdir)/*.c)
HFILES          = $(wildcard $(srcdir)/*.h)
plugins         = $(subst $(srcdir)/,,$(CFILES:.c=.la))
INSTALLED_ITEMS = $(subst $(srcdir)/,$(ext_dir)/,$(CFILES:.c=$(SHREXT)))
EXTRA_DIST      = $(CFILES) $(HFILES)

gegl_lt_cc_v = $(gegl_lt_cc_v_$(V))
gegl_lt_cc_v_ = $(gegl_lt_cc_v_$(AM_DEFAULT_VERBOSITY))
gegl_lt_cc_v_0 = @echo "  CC     " $<;
gegl_lt_ccld_v = $(gegl_lt_ccld_v_$(V))
gegl_lt_ccld_v_ = $(gegl_lt_ccld_v_$(AM_DEFAULT_VERBOSITY))
gegl_lt_ccld_v_0 = @echo "  CCLD   " $@;

all-local: $(plugins)

%.la: %.c $(GEGLHEADERS)
	$(gegl_lt_cc_v) $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $@.lo $<
	$(gegl_lt_ccld_v) $(LIBTOOL) --quiet --tag=CC --mode=link $(CC) $(AM_LDFLAGS) $(LDFLAGS) $(CFLAGS) -o $@ -rpath $(ext_dir) $@.lo $(LIBS) $(MATH_LIB)


clean-local:
	rm -f *.la

install-exec-local: all-local
	$(INSTALL) -d $(DESTDIR)$(ext_dir)
	for i in $(plugins); do \
	  $(LIBTOOL) --mode=install $(INSTALL) $$i $(DESTDIR)$(ext_dir) ; \
	done

uninstall-local:
	for i in $(plugins); do \
	  $(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(ext_dir)/$$i ; \
	done

check-local: all-local