[1477] | 1 | srcdir = @srcdir@
|
---|
| 2 | #VPATH = @srcdir@
|
---|
| 3 | INSTALL = @INSTALL@
|
---|
| 4 | prefix = @prefix@
|
---|
| 5 | exec_prefix = @exec_prefix@
|
---|
| 6 | bindir = @bindir@
|
---|
| 7 | CXX=@CXX@
|
---|
[1706] | 8 | AR=@AR@
|
---|
[1788] | 9 | ARFLAGS=@ARFLAGS@
|
---|
[1707] | 10 | RANLIB=@RANLIB@
|
---|
[1732] | 11 | LIBS=@LIBS@
|
---|
[1477] | 12 | CXXFLAGS=-O -g
|
---|
| 13 | CFLAGS=-O -g
|
---|
| 14 |
|
---|
| 15 | USE_SOPHYA=@use_sophya@
|
---|
| 16 |
|
---|
| 17 | MACHEROS := $(shell echo `uname`)
|
---|
| 18 | MACHDIR := $(MACHEROS)-$(CXX)
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | ifeq ($(USE_SOPHYA),1)
|
---|
[1730] | 22 | include $(DPCBASEREP)/Include/MakefileUser.h
|
---|
[1477] | 23 |
|
---|
| 24 | ifdef NOSHLIB
|
---|
[1730] | 25 | LIBF = $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a
|
---|
[1732] | 26 | LIBS := -L$(LIB) -lSysTools -lNTools -lBlitz $(LIBS)
|
---|
[1477] | 27 | ifeq ($(CXX),cxx)
|
---|
| 28 | # librairie des instances de templates cxx
|
---|
| 29 | LIBS := $(LIBS) -lrt
|
---|
| 30 | endif
|
---|
| 31 | else
|
---|
| 32 | LIBF = $(SLB)libsophya.so
|
---|
[1732] | 33 | LIBS := -L$(SLB) -lextsophya -lsophya $(LIBS)
|
---|
[1477] | 34 | ifeq ($(MACHEROS),OSF1)
|
---|
| 35 | LIBS := $(LIBS) -lfor
|
---|
| 36 | endif
|
---|
| 37 | endif
|
---|
| 38 |
|
---|
| 39 | CPPFLAGS := -DWITH_SOPHYA $(CPPFLAGS)
|
---|
[1685] | 40 | ifeq ($(CXX), cxx)
|
---|
| 41 | LIBS := $(LIBS) -pthread
|
---|
| 42 | endif
|
---|
[1477] | 43 | else
|
---|
| 44 | ifeq ($(CXX), cxx)
|
---|
| 45 | CXXFLAGS := -O -g -D__USE_STD_IOSTREAM
|
---|
[1663] | 46 | LIBS := $(LIBS) -pthread
|
---|
[1477] | 47 | endif
|
---|
| 48 | endif
|
---|
| 49 |
|
---|
| 50 |
|
---|
[1957] | 51 | CPPFLAGS := $(CPPFLAGS) @cfitsincdir@ -I. -I.. -DANSI -I$(srcdir)/../Kernel -I$(srcdir)/../Processors -I$(srcdir)/../ProcWSophya -I$(srcdir)/..
|
---|
[1477] | 52 |
|
---|
[1480] | 53 | ifeq ($(USE_SOPHYA),1)
|
---|
| 54 | LDLIBS=-L.. -latsop -latkern -latproc @cfitslibdir@ -lcfitsio $(LIBS)
|
---|
| 55 | LIBDEPS=../libatsop.a ../libatkern.a ../libatproc.a
|
---|
| 56 | else
|
---|
| 57 | LDLIBS=-L.. -latkern -latproc @cfitslibdir@ -lcfitsio $(LIBS)
|
---|
| 58 | LIBDEPS=../libatkern.a ../libatproc.a
|
---|
| 59 | endif
|
---|
[1477] | 60 |
|
---|
| 61 | ifeq ($(MACHEROS),IRIX64)
|
---|
| 62 | ifeq ($(CXX), g++)
|
---|
| 63 | LDLIBS=@cfitslibdir@ -lcfitsio -L /usr/lib32/
|
---|
| 64 | endif
|
---|
| 65 | ifeq ($(CXX), CC)
|
---|
[1793] | 66 | CXXFLAGS = -O -prelink -ptused
|
---|
[1764] | 67 | CFLAGS = -O
|
---|
| 68 | # CXXFLAGS = -LANG:std -woff 1171,1174,1552 -O -OPT:Olimit=0
|
---|
| 69 | # CFLAGS = -O -OPT:Olimit=0
|
---|
[1477] | 70 | endif
|
---|
| 71 | endif
|
---|
| 72 |
|
---|
| 73 | ifeq ($(CXX), g++)
|
---|
| 74 | CC = gcc
|
---|
| 75 | endif
|
---|
| 76 |
|
---|
[1480] | 77 | ifeq ($(CXX), cxx)
|
---|
| 78 | CXXFLAGS := $(CXXFLAGS) -ptr ../cxx_repository
|
---|
| 79 | endif
|
---|
| 80 |
|
---|
| 81 |
|
---|
[1477] | 82 | default:
|
---|
| 83 | echo "no program specified"
|
---|
| 84 |
|
---|
| 85 | clean:
|
---|
| 86 | rm -f *.o
|
---|
| 87 | rm -rf rii_files ii_files cxxrep cxx_repository
|
---|
| 88 |
|
---|
[1480] | 89 | %: %.o $(FILES) $(LIBDEPS)
|
---|
[1663] | 90 | $(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@ -lm
|
---|
[1477] | 91 |
|
---|
| 92 | %.o:$(srcdir)/%.cc
|
---|
[1663] | 93 | $(COMPILE.cc) -o $@ $<
|
---|
[1477] | 94 |
|
---|
| 95 | %.o:$(srcdir)/%.c
|
---|
[1663] | 96 | $(COMPILE.c) -o $@ $<
|
---|
[1477] | 97 |
|
---|
| 98 |
|
---|
| 99 |
|
---|
| 100 | %.d: $(srcdir)/%.cc
|
---|
[1692] | 101 | $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \
|
---|
[1477] | 102 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
---|
| 103 | [ -s $@ ] || rm -f $@'
|
---|
| 104 |
|
---|
| 105 | %.d: $(srcdir)/%.c
|
---|
[1692] | 106 | $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \
|
---|
[1477] | 107 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
---|
| 108 | [ -s $@ ] || rm -f $@'
|
---|
| 109 |
|
---|
| 110 | include $(patsubst %.c,%.d,$(SRCFILES:.cc=.d))
|
---|
| 111 |
|
---|