Blame Makefile.default

Packit 9c559b
VERSION = 0.6
Packit 9c559b
PREFIX = /usr/local
Packit 9c559b
CFLAGS = -Wall -g -I. -O3 -funroll-loops -finline-limit=9999999 -ffast-math -malign-double -march=`uname -m` -fPIC
Packit 9c559b
Packit 9c559b
TARDIR = libgdither-$(VERSION)
Packit 9c559b
Packit 9c559b
all: libgdither.so
Packit 9c559b
Packit 9c559b
gdither.o: gdither.c gdither.h gdither_types_internal.h
Packit 9c559b
	$(CC) $(CFLAGS) -c gdither.c
Packit 9c559b
Packit 9c559b
libgdither.so: gdither.o
Packit 9c559b
	$(CC) -shared gdither.o -o libgdither.so
Packit 9c559b
Packit 9c559b
libgdither.pc: libgdither.pc.in Makefile
Packit 9c559b
	sed -e 's|@VERSION@|$(VERSION)|' -e 's|@PREFIX@|$(PREFIX)|' \
Packit 9c559b
		libgdither.pc.in > libgdither.pc
Packit 9c559b
Packit 9c559b
install: all
Packit 9c559b
	install -d $(PREFIX)/lib/
Packit 9c559b
	install libgdither.so $(PREFIX)/lib/
Packit 9c559b
	install -d $(PREFIX)/include/
Packit 9c559b
	install gdither.h $(PREFIX)/include/
Packit 9c559b
	install gdither_types.h $(PREFIX)/include/
Packit 9c559b
	install -d $(PREFIX)/lib/pkgconfig/
Packit 9c559b
	install libgdither.pc $(PREFIX)/lib/pkgconfig/
Packit 9c559b
Packit 9c559b
clean:
Packit 9c559b
	rm -f *.o *.so
Packit 9c559b
	(cd tests && make clean)
Packit 9c559b
	(cd examples && make clean)
Packit 9c559b
Packit 9c559b
dist: all libgdither.pc
Packit 9c559b
	rm -rf $(TARDIR)
Packit 9c559b
	mkdir -p $(TARDIR)/tests $(TARDIR)/examples
Packit 9c559b
	cp README COPYING Makefile *.c *.h libgdither.pc \
Packit 9c559b
		$(TARDIR)
Packit 9c559b
	cp tests/Makefile tests/*.[ch] tests/*.cc \
Packit 9c559b
		$(TARDIR)/tests/ 
Packit 9c559b
	cp examples/Makefile examples/*.[ch] \
Packit 9c559b
		$(TARDIR)/examples/ 
Packit 9c559b
	(cd $(TARDIR) && make test clean)
Packit 9c559b
	tar cfz $(TARDIR).tar.gz $(TARDIR)
Packit 9c559b
	@rm -rf $(TARDIR)
Packit 9c559b
Packit 9c559b
test: all
Packit 9c559b
	(cd tests && make test)