| 1 | srcdir = @srcdir@
 | 
|---|
| 2 | #VPATH = @srcdir@
 | 
|---|
| 3 | INSTALL = @INSTALL@
 | 
|---|
| 4 | prefix = @prefix@
 | 
|---|
| 5 | exec_prefix = @exec_prefix@
 | 
|---|
| 6 | bindir = @bindir@
 | 
|---|
| 7 | CXX=@CXX@
 | 
|---|
| 8 | AR=@AR@
 | 
|---|
| 9 | ARFLAGS=@ARFLAGS@
 | 
|---|
| 10 | RANLIB=@RANLIB@
 | 
|---|
| 11 | LIBS=@LIBS@
 | 
|---|
| 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) 
 | 
|---|
| 22 |  include $(DPCBASEREP)/Include/MakefileUser.h
 | 
|---|
| 23 | 
 | 
|---|
| 24 |  ifdef NOSHLIB
 | 
|---|
| 25 |   LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a 
 | 
|---|
| 26 |   LIBS := -L$(LIB)  -lSysTools -lNTools -lBlitz  $(LIBS)
 | 
|---|
| 27 |   ifeq ($(CXX),cxx)
 | 
|---|
| 28 |    # librairie des instances de templates cxx
 | 
|---|
| 29 |    LIBS := $(LIBS) -lrt
 | 
|---|
| 30 |   endif
 | 
|---|
| 31 |  else
 | 
|---|
| 32 |   LIBF =  $(SLB)libsophya.so 
 | 
|---|
| 33 |   LIBS := -L$(SLB)  -lextsophya -lsophya $(LIBS)
 | 
|---|
| 34 |   ifeq ($(MACHEROS),OSF1)
 | 
|---|
| 35 |    LIBS := $(LIBS) -lfor
 | 
|---|
| 36 |   endif
 | 
|---|
| 37 |  endif
 | 
|---|
| 38 |  
 | 
|---|
| 39 |  CPPFLAGS := -DWITH_SOPHYA $(CPPFLAGS)
 | 
|---|
| 40 |  ifeq ($(CXX), cxx)
 | 
|---|
| 41 |    LIBS := $(LIBS) -pthread
 | 
|---|
| 42 |  endif
 | 
|---|
| 43 | else
 | 
|---|
| 44 |  ifeq ($(CXX), cxx)
 | 
|---|
| 45 |   CXXFLAGS := -O -g -D__USE_STD_IOSTREAM
 | 
|---|
| 46 |   LIBS := $(LIBS) -pthread
 | 
|---|
| 47 |  endif
 | 
|---|
| 48 | endif
 | 
|---|
| 49 | 
 | 
|---|
| 50 | 
 | 
|---|
| 51 | CPPFLAGS    :=  $(CPPFLAGS) @cfitsincdir@ -I. -I.. -DANSI -I$(srcdir)/../Kernel -I$(srcdir)/../Processors -I$(srcdir)/../ProcWSophya -I$(srcdir)/..
 | 
|---|
| 52 | 
 | 
|---|
| 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
 | 
|---|
| 60 | 
 | 
|---|
| 61 | ifeq ($(MACHEROS),IRIX64)
 | 
|---|
| 62 |  ifeq ($(CXX), g++)
 | 
|---|
| 63 |    LDLIBS=@cfitslibdir@ -lcfitsio -L /usr/lib32/
 | 
|---|
| 64 |  endif
 | 
|---|
| 65 |  ifeq ($(CXX), CC)
 | 
|---|
| 66 |     CXXFLAGS = -O -prelink -ptused
 | 
|---|
| 67 |     CFLAGS   = -O
 | 
|---|
| 68 | #   CXXFLAGS = -LANG:std -woff 1171,1174,1552 -O -OPT:Olimit=0
 | 
|---|
| 69 | #   CFLAGS  =  -O -OPT:Olimit=0
 | 
|---|
| 70 |  endif
 | 
|---|
| 71 | endif
 | 
|---|
| 72 | 
 | 
|---|
| 73 | ifeq ($(CXX), g++)
 | 
|---|
| 74 |   CC = gcc
 | 
|---|
| 75 | endif
 | 
|---|
| 76 | 
 | 
|---|
| 77 | ifeq ($(CXX), cxx)
 | 
|---|
| 78 |   CXXFLAGS := $(CXXFLAGS) -ptr ../cxx_repository
 | 
|---|
| 79 | endif
 | 
|---|
| 80 | 
 | 
|---|
| 81 | 
 | 
|---|
| 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 | 
 | 
|---|
| 89 | %: %.o $(FILES) $(LIBDEPS)
 | 
|---|
| 90 |         $(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@ -lm
 | 
|---|
| 91 | 
 | 
|---|
| 92 | %.o:$(srcdir)/%.cc
 | 
|---|
| 93 |         $(COMPILE.cc) -o $@ $<
 | 
|---|
| 94 | 
 | 
|---|
| 95 | %.o:$(srcdir)/%.c
 | 
|---|
| 96 |         $(COMPILE.c) -o $@ $<
 | 
|---|
| 97 | 
 | 
|---|
| 98 | 
 | 
|---|
| 99 | 
 | 
|---|
| 100 | %.d: $(srcdir)/%.cc
 | 
|---|
| 101 |         $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \
 | 
|---|
| 102 |                 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
 | 
|---|
| 103 |                 [ -s $@ ] || rm -f $@'
 | 
|---|
| 104 | 
 | 
|---|
| 105 | %.d: $(srcdir)/%.c
 | 
|---|
| 106 |         $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \
 | 
|---|
| 107 |                 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
 | 
|---|
| 108 |                 [ -s $@ ] || rm -f $@'
 | 
|---|
| 109 | 
 | 
|---|
| 110 | include $(patsubst %.c,%.d,$(SRCFILES:.cc=.d))
 | 
|---|
| 111 | 
 | 
|---|