head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	93.05.18.17.06.06;	author craig;	state Exp;
branches;
next	1.4;

1.4
date	93.04.30.18.26.44;	author craig;	state Exp;
branches;
next	1.3;

1.3
date	93.04.27.17.03.24;	author craig;	state Exp;
branches;
next	1.2;

1.2
date	93.04.22.14.39.02;	author craig;	state Exp;
branches;
next	1.1;

1.1
date	93.04.21.15.13.59;	author craig;	state Exp;
branches;
next	;


desc
@Makefile for the almanac programs.
@


1.5
log
@changed the executable from almn to almanac and also moving it
to a $(BIN) directory.
@
text
@##############################################
# Makefile for Astronomical Almanac software #
##############################################

##############################
# define variables and paths #
##############################

#	tell make what default target is

ALMANAC : almanac

CC = gcc
LD = gcc

# where the executables go

BIN = /home/mhd/craig/bin

# where the gcc stuff is located

GCCHEAD = /usr/local/export/gnu

# where the include files are

HPATH = ../h

# where the libraries are located

LPATH = ../lib

# the almanac library

AALIB = $(LPATH)/aalib.a

CFLAGS = -O -I/usr/5include -I$(HPATH)

CFILES	= altaz.c angles.c annuab.c cmoon.c constel.c deflec.c deltat.c \
	diurab.c diurpx.c dms.c epsiln.c fk4fk5.c kepler.c kfiles.c \
	lightt.c lonlat.c nutate.c precess.c refrac.c rplanet.c rstar.c \
	sidrlt.c sun.c trnsit.c vearth.c oearth.c manoms.c \
	ojupiter.c omars.c omercury.c oneptune.c osaturn.c ouranus.c \
	ovenus.c cnstinit.c matan2.c kep.h aaproto.h satellite.h

OFILES	= altaz.o angles.o annuab.o cmoon.o constel.o deflec.o deltat.o \
	diurab.o diurpx.o dms.o epsiln.o fk4fk5.o kepler.o kfiles.o \
	lightt.o lonlat.o nutate.o precess.o refrac.o rplanet.o rstar.o \
	sidrlt.o sun.o trnsit.o vearth.o oearth.o manoms.o \
	ojupiter.o omars.o omercury.o oneptune.o osaturn.o ouranus.o \
	ovenus.o cnstinit.o matan2.o

# Set the include file directory search path

vpath %.h $(HPATH)

################
# Dependencies #
################

kepler.o kfiles.o lightt.o rplanet.o rstar.o sun.o vearth.o aa.o : kep.h
oearth.o ojupiter.o omars.o omercury.o oneptune.o osaturn.o : kep.h
ouranus.o ovenus.o : kep.h

aa.o $(OFILES) : aaproto.h

altaz.o cmoon.o deflec.o deltat.o diurab.o diurpx.o dms.o : satellite.h
epsiln.o fk4fk5.o kepler.o kfile.o nutate.o precess.o : satellite.h
refrac.o rplanet.o rstar.o sidrlt.o sun.o trnsit.o : satellite.h
oearth.o manoms.o ojupiter.o omars.o omercury.o : satellite.h
oneptune.o osaturn.o ouranus.o ovenus.o cnstinit.o : satellite.h
matan2.o : satellite.h

#########
# Rules #
#########

#	rule to build the almanac program

almanac : aa.o $(CFILES)
	make getfiles
	@@echo " "
	$(LD) -o almanac aa.o $(AALIB) -lm
	mv almanac $(BIN)
	@@touch almanac
	@@rlog -t RCS/*,v > Filelist
	@@echo " "
	@@rm -f $(OFILES)

#	rule to build the aalib.a library archive

aalib.a : $(OFILES)
	@@echo " "
	ar rc $(AALIB) $(OFILES)
	ranlib $(AALIB)
	@@echo " "
	@@touch aalib

#	get the object files from the library archive

getfiles : $(CFILES)
	@@echo " "
	-csh -c "if (!(-e altaz.o) && -e $(AALIB)) ar xo $(AALIB) $(OFILES)"
	@@echo " "
	make aalib.a
	@@touch getfiles

#	rule to make sure the include files are current

# includes :
#	@@echo " "
#	cd $(HPATH); $(MAKE)
#	@@echo " "

#	default rule to make .o files from .c files

%.o : %.c
	@@echo " "
####	generate code
	$(CC) $(CFLAGS) -ansi -pedantic -c -Wall $*.c

#	misc rules

clean :
	@@echo " "
	rm -f $(OFILES) core *.BAK junk crud
@


1.4
log
@Changed getfiles target so it depends on the $(Cfiles) and
added some intellegence so that the files are retrieved only
if they aren't already there.  Some minor cosmetic changes.
@
text
@d11 1
a11 1
ALMANAC : almn
d16 4
d79 1
a79 1
almn : aa.o $(CFILES)
d82 3
a84 1
	$(LD) -o almn aa.o $(AALIB) -lm
d102 1
a102 1
	csh -c "if (!(-e altaz.o) && -e $(AALIB)) ar xo $(AALIB) $(OFILES)"
@


1.3
log
@various changes to get correct dependencies, etc so that
library does not have to be made every time gmake is ran.
@
text
@d39 1
a39 1
	ovenus.c cnstinit.c matan2.c  kep.h aaproto.h satellite.h
d81 1
a81 1
	rm $(OFILES)
d85 1
a85 1
aalib.a: $(OFILES)
d90 1
d94 1
a94 1
getfiles:
d96 1
a96 1
	csh -c "if (-e $(AALIB)) ar xo $(AALIB) $(OFILES)"
d99 1
a113 1
####	generate relocation bits (-r) but don't preserve local symbols (-x)
d119 1
a119 1
	-rm -f $(OFILES) core *.BAK junk crud
@


1.2
log
@Added rule to make the aalib.a library.
@
text
@d11 1
a11 1
ALMN : getfiles aalib.a almn clean
d32 1
a32 1
CFLAGS = -O -I/usr/5include  -I$(HPATH)
d34 8
a41 1
FILES	= altaz.o angles.o annuab.o cmoon.o constel.o deflec.o deltat.o \
d44 1
a44 1
	sidrlt.o sun.o trnsit.o vearth.o aa.o oearth.o manoms.o \
d60 1
a60 1
$(FILES) : aaproto.h
d75 4
a78 2
almn : $(FILES)
	$(LD) -o almn $(FILES) -lm
d80 2
d85 1
a85 1
aalib.a: $(FILES)
d87 1
a87 1
	ar rc $(AALIB) $(FILES)
d95 1
a95 1
	csh -c "if (-e $(AALIB)) ar xo $(AALIB) $(FILES)"
d97 1
d117 2
a118 1
	-rm -f *.o lint.log core *.BAK *.SYMDEF aalib.a
@


1.1
log
@Initial revision
@
text
@d11 1
a11 1
ALMN : almn
d16 2
d20 9
a28 1
CFLAGS = -O -I/usr/5include 
d30 4
d41 4
d53 8
a60 13
altaz.o angles.o annuab.o cmoon.o constel.o deflec.o deltat.o : aaproto.h
diurab.o diurpx.o dms.o epsiln.o fk4fk5.o kepler.o kfiles.o : aaproto.h
lightt.o lonlat.o nutate.o precess.o refrac.o rplanet.o : aaproto.h
rstar.o sidrlt.o sun.o trnsit.o vearth.o aa.o oearth.o : aaproto.h
manoms.o ojupiter.o omars.o omercury.o oneptune.o osaturn.o : aaproto.h
ouranus.o ovenus.o cnstinit.o matan2.o : aaproto.h

altaz.o cmoon.o deflec.o deltat.o diurab.o diurpx.o dms.o : ../satellite.h
epsiln.o fk4fk5.o kepler.o kfile.o nutate.o precess.o : ../satellite.h
refrac.o rplanet.o rstar.o sidrlt.o sun.o trnsit.o : ../satellite.h
oearth.o manoms.o ojupiter.o omars.o omercury.o : ../satellite.h
oneptune.o osaturn.o ouranus.o ovenus.o cnstinit.o : ../satellite.h
matan2.o : ../satellite.h
d66 1
a66 1
#	rule to build the videk.o library
a70 1
	@@touch almn
d72 15
d91 2
a92 1
#	cd $(H0); $(MAKE)
d105 1
a105 1
	-rm -f *.o lint.log core *.BAK
@
