diff options
| author | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2011-05-04 22:44:12 +0000 |
|---|---|---|
| committer | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2011-05-04 22:44:12 +0000 |
| commit | fd3e80fb30194c7c5dc4e8069852559ab054b204 (patch) | |
| tree | b949e42c911fbaa52b2f9ab8a2a26b569da30a78 /Makefile.frag | |
| parent | d994b724f319f04948f6ae3ec2f43723132f7df3 (diff) | |
- added makefile fragment to automatically compile and install filter modules with the extension
git-svn-id: https://siedziba.pl:790/svn/repos/php-imlib/trunk@337 455248ca-bdda-0310-9134-f4ebb693071a
Diffstat (limited to 'Makefile.frag')
| -rw-r--r-- | Makefile.frag | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile.frag b/Makefile.frag new file mode 100644 index 0000000..e4774f4 --- /dev/null +++ b/Makefile.frag @@ -0,0 +1,21 @@ +filters_srcdir := $(top_srcdir)/filters +filters_builddir := $(top_builddir)/filters +filters := $(notdir $(basename $(wildcard $(filters_srcdir)/*.c))) +filters_la := $(addprefix $(filters_builddir)/,$(addsuffix .la,$(filters))) +filters_lo := $(addprefix $(filters_builddir)/,$(addsuffix .lo,$(filters))) +filters_libdir := $(INSTALL_ROOT)$(EXTENSION_DIR)/php_imlib_filters + +all : $(filters_la) +install: filters_install +clean: filters_clean + +$(filters_lo) : $(filters_builddir)/%.lo : $(filters_srcdir)/%.c + $(LIBTOOL) --mode=compile $(CC) -c `php-config --includes` -I$(top_srcdir) $(filters_srcdir)/$*.c -o $(filters_builddir)/$*.lo +$(filters_la) : %.la : %.lo + $(LIBTOOL) --mode=link $(CC) -module -avoid-version -o $*.la $*.lo -rpath $(filters_libdir) -lm +filters_install: + $(mkinstalldirs) $(filters_libdir) + $(LIBTOOL) --mode=install cp $(filters_la) $(filters_libdir) +filters_clean: + rm -f $(filters_builddir)/*.{la,lo} + rm -rf $(filters_builddir)/.libs |
