-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (28 loc) · 881 Bytes
/
Makefile
File metadata and controls
45 lines (28 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#CFLAGS = -g -Wall -Werror
CFLAGS = -O
LIBS = -lm
SRCS = coords.c dates.c utils.c precession.c kepler.c sun.c planets.c \
moon.c stars.c io.c navigation.c yale.c
OBJS = $(SRCS:.c=.o)
HDRS = astro.h
PROGS = ephem dates test navigation
lib: libastro.a
libastro.a: $(OBJS)
ar -ruv $@ $(OBJS)
ephem: ephem.o libastro.a
$(CC) $(CFLAGS) -o ephem ephem.o libastro.a $(LIBS)
test: test.o libastro.a
$(CC) $(CFLAGS) -o test test.o libastro.a $(LIBS)
dates: dates.c utils.o libastro.a
$(CC) $(CFLAGS) -DSTANDALONE -o dates dates.c libastro.a $(LIBS)
navigation: navigation.c libastro.a
$(CC) $(CFLAGS) -DSTANDALONE -o navigation navigation.c libastro.a $(LIBS)
yale: yale.c libastro.a
$(CC) $(CFLAGS) -DSTANDALONE -o yale yale.c libastro.a $(LIBS)
tags: $(SRCS) $(HDRS)
ctags $(SRCS) $(HDRS)
clean:
rm -f *.o
spotless: clean
rm -f *.a ${PROGS} tags
rm -rf *.dSYM