[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / OpenXM / src / hgm / fisher-bingham / src

File: [local] / OpenXM / src / hgm / fisher-bingham / src / Makefile (download)

Revision 1.2, Thu Mar 27 05:24:28 2014 UTC (10 years, 2 months ago) by takayama
Branch: MAIN
CVS Tags: RELEASE_1_3_1_13b, HEAD
Changes since 1.1: +42 -4 lines

A manual and a library for nk_fb_ten_c.
nk_fb_gen_c-ja.texi generated from nk_fb_gen_c.oxg gives an explanation
how to make a maximal likelihood estimate (MLE) for the Fisher-Bingham distribution
with this package.

(commit by proxy of T.Koyama, H.Nakayama, K.Nishiyama).

AR=ar
RANLIB=ranlib
CC = gcc
libs_gsl = -lgsl -lblas -lm
ko-initial-objs= ko-initial.o ko-fbd-rk.o ko-fbd-ps.o ko-perturbation.o ko-fbd-io.o ko-time.o

all: hgm_ko_nc_fb  libko_fb.a 

usage:
	@echo "In order to compile testNN.c generated by nk_fb_gen_c.gen_c(NN) of nk_fb_gen_c.rr,"
	@echo "run the command"
	@echo "      gcc testNN.c libko_fb.a -lgsl -lblas"
	@echo "after editing the data testNN.c following the comments."
	@echo "Sample data are in Testdata/sNN_*_data.h"
	@echo "See asir-contrib/packages/doc/nk_fb_gen_c as to details."
 
.c.o:
	${CC} $< -c

hgm_ko_nc_fb: hgm_ko_nc_fb.o
	${CC} -o hgm_ko_nc_fb hgm_ko_nc_fb.o ${libs_gsl}
hgm_ko_nc_fb.o: hgm_ko_nc_fb.c
	${CC} -c -DSTANDALONE hgm_ko_nc_fb.c
#todo, the install folder should be changeable by configure.
install: hgm_ko_nc_fb libko_fb.a
	install hgm_ko_nc_fb ../../../../bin
	install libko_fb.a ../../../../lib

libko_fb.a: $(ko-initial-objs)
	if [ ${AR} = ar ]; then \
	ar ru libko_fb.a $(ko-initial-objs) ; \
	else \
	libtool -static -o libko_fb.a $(ko-initial-objs) ; \
	fi
	${RANLIB} libko_fb.a

# HGD for the Fisher-Bingham distribution
ko-initial.o: ko-fbd.c
	${CC} ko-fbd.c  -o $@ -c -D_HGD 

ko-fbd.o:ko-fbd.c perturbation.h ko-fbd.h ko-time.h
	${CC} ko-fbd.c -c 

ko-fbd-io.o: ko-io.c
	${CC} ko-io.c -c -D_SPHERE -o $@


clean:
	rm -f *~ *.o a.out ${ko-initial-objs} libko_fb.a hgm_ko_nc_fb