|
Packit |
c948fe |
VERSION = 0.6
|
|
Packit Service |
b8fe13 |
PREFIX = /usr
|
|
Packit Service |
b8fe13 |
CFLAGS = $(INIT_CFLAGS) -I. -ffast-math -fPIC
|
|
Packit |
c948fe |
|
|
Packit |
c948fe |
TARDIR = libgdither-$(VERSION)
|
|
Packit |
c948fe |
|
|
Packit Service |
6879db |
all: libgdither.so.1.0
|
|
Packit |
c948fe |
|
|
Packit |
c948fe |
gdither.o: gdither.c gdither.h gdither_types_internal.h
|
|
Packit |
c948fe |
$(CC) $(CFLAGS) -c gdither.c
|
|
Packit |
c948fe |
|
|
Packit Service |
6879db |
libgdither.so.1.0: gdither.o
|
|
Packit Service |
6879db |
$(CC) $(LDFLAGS) -shared gdither.o -Wl,-soname,libgdither.so.1 -o libgdither.so.1.0
|
|
Packit |
c948fe |
|
|
Packit |
c948fe |
libgdither.pc: libgdither.pc.in Makefile
|
|
Packit |
c948fe |
sed -e 's|@VERSION@|$(VERSION)|' -e 's|@PREFIX@|$(PREFIX)|' \
|
|
Packit |
c948fe |
libgdither.pc.in > libgdither.pc
|
|
Packit |
c948fe |
|
|
Packit |
c948fe |
install: all
|
|
Packit Service |
b8fe13 |
mkdir -p $(DESTDIR)$(LIBDIR)
|
|
Packit Service |
b8fe13 |
install -pm 0755 libgdither.so* $(DESTDIR)$(LIBDIR)
|
|
Packit Service |
b8fe13 |
ln -s libgdither.so.1.0 $(DESTDIR)$(LIBDIR)/libgdither.so.1
|
|
Packit Service |
b8fe13 |
ln -s libgdither.so.1.0 $(DESTDIR)$(LIBDIR)/libgdither.so
|
|
Packit Service |
b8fe13 |
mkdir -p $(DESTDIR)$(PREFIX)/include/libgdither
|
|
Packit Service |
b8fe13 |
install -pm 0644 gdither.h $(DESTDIR)$(PREFIX)/include/libgdither
|
|
Packit Service |
b8fe13 |
install -pm 0644 gdither_types.h $(DESTDIR)$(PREFIX)/include/libgdither
|
|
Packit Service |
b8fe13 |
mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig/
|
|
Packit Service |
b8fe13 |
install -pm 0644 libgdither.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
|
|
Packit |
c948fe |
|
|
Packit |
c948fe |
clean:
|
|
Packit |
c948fe |
rm -f *.o *.so
|
|
Packit |
c948fe |
(cd tests && make clean)
|
|
Packit |
c948fe |
(cd examples && make clean)
|
|
Packit |
c948fe |
|
|
Packit |
c948fe |
dist: all libgdither.pc
|
|
Packit |
c948fe |
rm -rf $(TARDIR)
|
|
Packit |
c948fe |
mkdir -p $(TARDIR)/tests $(TARDIR)/examples
|
|
Packit |
c948fe |
cp README COPYING Makefile *.c *.h libgdither.pc \
|
|
Packit |
c948fe |
$(TARDIR)
|
|
Packit |
c948fe |
cp tests/Makefile tests/*.[ch] tests/*.cc \
|
|
Packit |
c948fe |
$(TARDIR)/tests/
|
|
Packit |
c948fe |
cp examples/Makefile examples/*.[ch] \
|
|
Packit |
c948fe |
$(TARDIR)/examples/
|
|
Packit |
c948fe |
(cd $(TARDIR) && make test clean)
|
|
Packit |
c948fe |
tar cfz $(TARDIR).tar.gz $(TARDIR)
|
|
Packit |
c948fe |
@rm -rf $(TARDIR)
|
|
Packit |
c948fe |
|
|
Packit |
c948fe |
test: all
|
|
Packit |
c948fe |
(cd tests && make test)
|