Makefile 793 Bytes
Newer Older
Fang Yuedong's avatar
Fang Yuedong committed
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
#OPTS += -D

CC          =  gcc
OPTIMIZE    =  -fPIC -shared -g -O3 #-Wall -wd981 #-wd1419 -wd810
#GSLI        =  -I/home/alex/opt/gsl/include
#GSLL        =  -L/home/alex/opt/gsl/lib -lgsl -lgslcblas
#FFTWI       =  -I/home/alex/opt/fftw/include
#FFTWL       =  -L/home/alex/opt/fftw/lib -lfftw3 -lfftw3f
#HDF5I       =  -I/home/alex/opt/hdf5/include
#HDF5L       =  -L/home/alex/opt/hdf5/lib  -lhdf5_hl -lhdf5
#FITSI       =  -I/home/alex/opt/cfitsio/include
#FITSL       =  -L/home/alex/opt/cfitsio/lib -lcfitsio
#EXTRACFLAGS =
#EXTRACLIB   =

CLINK=$(CC)
CFLAGS=$(OPTIMIZE) #$(EXTRACFLAGS) $(OPTS)
CLIB=-lm #$(EXTRACLIB)

OBJS = test.o

EXEC = libtest.so
all: $(EXEC)

$(EXEC): $(OBJS)
	$(CLINK) $(CFLAGS) -o $@ $(OBJS) $(CLIB)

$(OBJS): Makefile

.PHONY : clean
clean:
	rm -f *.o $(EXEC)