-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile.osx
82 lines (63 loc) · 2.88 KB
/
Makefile.osx
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# STRF MacOSX Makefile
#
# Mark Jessop 2018-12
#
# Your Prefix.
# If running Macports, this will likely be /opt/local
# if using Homebrew, then probably /usr/local/
prefix = /opt/local
# Compiling flags
CFLAGS = -O3 -I$(prefix)/include
# Linking flags
LFLAGS = -L$(prefix)/lib -lcpgplot -lpgplot -lX11 -lpng -lm -lgsl -lgslcblas
# Compiler
# NOTE: STRF will not compile or link correctly with the system gcc (which is actually clang)
# It's best to build with gcc provided by Macports or Homebrew
# Under Macports, this is provided as gcc-mp-7, as below, on Homebrew this may be different.
# Newer Macports releases use gcc-mp-10, therefor changed the default to gcc-mp-10
CC = $(prefix)/bin/gcc-mp-10
# Installation
INSTALL_PROGRAM = install -m 755
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
all:
make rfedit rfplot rffft rfpng rffit rffind
rffit: rffit.o sgdp4.o satutl.o deep.o ferror.o dsmin.o simplex.o versafit.o rfsites.o rftles.o
$(CC) -o rffit rffit.o sgdp4.o satutl.o deep.o ferror.o dsmin.o simplex.o versafit.o rfsites.o rftles.o $(LFLAGS)
rfpng: rfpng.o rftime.o rfio.o rftrace.o sgdp4.o satutl.o deep.o ferror.o rftles.o zscale.o
$(CC) -o rfpng rfpng.o rftime.o rfio.o rftrace.o sgdp4.o satutl.o deep.o ferror.o rftles.o zscale.o $(LFLAGS)
rfedit: rfedit.o rfio.o rftime.o zscale.o
$(CC) -o rfedit rfedit.o rfio.o rftime.o zscale.o -lm
rffind: rffind.o rfio.o rftime.o zscale.o
$(CC) -o rffind rffind.o rfio.o rftime.o zscale.o -lm
rftrack: rftrack.o rfio.o rftime.o rftrace.o sgdp4.o satutl.o deep.o ferror.o zscale.o
$(CC) -o rftrack rftrack.o rfio.o rftime.o rftrace.o sgdp4.o satutl.o deep.o ferror.o zscale.o -lm
rfplot: rfplot.o rftime.o rfio.o rftrace.o sgdp4.o satutl.o deep.o ferror.o versafit.o dsmin.o simplex.o rftles.o zscale.o
$(CC) -o rfplot rfplot.o rftime.o rfio.o rftrace.o sgdp4.o satutl.o deep.o ferror.o versafit.o dsmin.o simplex.o rftles.o zscale.o $(LFLAGS)
rffft: rffft.o rffft_internal.o rftime.o
$(CC) -o rffft rffft.o rffft_internal.o rftime.o -lfftw3f -lm -lsox $(LFLAGS)
tests/tests: tests/tests.o tests/tests_rffft_internal.o tests/tests_rftles.o rffft_internal.o rftles.o satutl.o ferror.o
$(CC) -Wall -o $@ $^ -lcmocka -lm
tests: tests/tests
./tests/tests
.PHONY: clean install uninstall tests
clean:
rm -f *.o tests/*.o
rm -f *~
install:
$(INSTALL_PROGRAM) rffit $(DESTDIR)$(bindir)/rffit
$(INSTALL_PROGRAM) rfpng $(DESTDIR)$(bindir)/rfpng
$(INSTALL_PROGRAM) rfedit $(DESTDIR)$(bindir)/rfedit
$(INSTALL_PROGRAM) rffind $(DESTDIR)$(bindir)/rffind
$(INSTALL_PROGRAM) rfplot $(DESTDIR)$(bindir)/rfplot
$(INSTALL_PROGRAM) rffft $(DESTDIR)$(bindir)/rffft
$(INSTALL_PROGRAM) rffft $(DESTDIR)$(bindir)/tleupdate
uninstall:
$(RM) $(DESTDIR)$(bindir)/rffit
$(RM) $(DESTDIR)$(bindir)/rfpng
$(RM) $(DESTDIR)$(bindir)/rfedit
$(RM) $(DESTDIR)$(bindir)/rffind
$(RM) $(DESTDIR)$(bindir)/rfplot
$(RM) $(DESTDIR)$(bindir)/rffft
$(RM) $(DESTDIR)$(bindir)/tleupdate