# $Id: Makefile 892 2006-03-01 20:11:59Z denneau $

#CFLAGS = -D_GNU_SOURCE -g -I$(MOPS_HOME)/include
CFLAGS = -D_GNU_SOURCE -I$(MOPS_HOME)/include
LDFLAGS = --ml cdecl -L. -L$(MOPS_HOME)/lib  -lm -lmopsephem --staticlink

all: shape.x shape2

install:
	cp shape.x $(MOPS_HOME)/bin
	cp genshape.pl $(MOPS_HOME)/bin

clean:
	rm *.o shape.x shape2

shape.x: shape.c shape.h trifac.c conv2lc.c ell2conv.c ecl2ast.c magcorr.c fvector.c
	gcc $(CFLAGS) -c shape.c trifac.c conv2lc.c ell2conv.c ecl2ast.c magcorr.c fvector.c
	lf95 $(LDFLAGS) --out shape.x shape.o trifac.o conv2lc.o ell2conv.o ecl2ast.o magcorr.o fvector.o

shape2: shape2.c shape.h trifac.c conv2lc.c ell2conv.c ecl2ast.c magcorr.c fvector.c
	gcc $(CFLAGS) -c shape2.c trifac.c conv2lc.c ell2conv.c ecl2ast.c magcorr.c fvector.c
	lf95 $(LDFLAGS) --out shape2 shape2.o trifac.o conv2lc.o ell2conv.o ecl2ast.o magcorr.o fvector.o
