[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_pari

File: [local] / OpenXM / src / ox_pari / Attic / Makefile (download)

Revision 1.5, Sun Sep 27 00:12:31 2015 UTC (8 years, 8 months ago) by takayama
Branch: MAIN
Changes since 1.4: +4 -4 lines

The order of libnames for the linker should be this one on cygwin and msys2
all-oxpari depends on install-pari.

# $OpenXM: OpenXM/src/ox_pari/Makefile,v 1.5 2015/09/27 00:12:31 takayama Exp $

OpenXM_HOME=../..
OpenXM_LIBDIR=../../lib
PARI_LIB = -lmpfr -lpari
OpenXM_LIB = -L$(OpenXM_LIBDIR) -lox $(PARI_LIB) -lgmp  -lgc
INCLUDES = -I$(OpenXM_HOME)/include
PREFIX=${OpenXM_HOME}
DISTDIR=${OpenXM_HOME}/../OpenXM_dist
RM = /bin/rm
MASTER_SITE=http://www.math.kobe-u.ac.jp/pub/OpenXM/misc/
CFLAGS = -g -Wall -finline-functions -D_POSIX_C_SOURCE


PARIOBJ = ox_pari.o convert.o pari_ftab.o

LIBS = $(OpenXM_LIB) -lm

PROG= ox_pari

all: build

components : libs $(PROG)

ox_pari: $(PARIOBJ)
	$(CC) $(PARIOBJ) $(LIBS) -o $@

ox_pari.o : ox_pari.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $<

convert.o : convert.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $<

pari_ftab.o : pari_ftab.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $<


libs : ox gc libgmp


ox : 
	-@if test -f $(OpenXM_HOME)/lib/libox.a ; then \
		true ; \
	else \
		( cd $(OpenXM_HOME)/src/ ; make install-oxtoolkit ) ; \
	fi

gc :
	-@if test -f $(OpenXM_HOME)/lib/libgc.a ; then \
		true ; \
	else \
		( cd $(OpenXM_HOME)/src/ ; make install-gc ) ; \
	fi

libgmp : 
	-@if test -f $(OpenXM_HOME)/lib/libgmp.a ; then \
		true ; \
	else \
		( cd $(OpenXM_HOME)/src/ ; make install-gmp ) ; \
	fi

clean:

distclean: clean
	rm -f $(OpenXM_HOME)/lib/libox.a
	rm -f $(OpenXM_HOME)/lib/libgc.a

build : components

install: build
	cp $(PROG) $(PREFIX)/bin
	-mkdir $(PREFIX)/lib/asir
	-for i in $(PROG); do \
		ln -s $(PREFIX)/bin/$$i $(PREFIX)/lib/asir ; \
	done

clean:
	-$(RM) -f $(PROG) *.o
	-$(RM)  *.core

distclean: clean