[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)
|
---|
[2187] | 54 | # LDLIBS=-L.. -latsop -latkern -latproc @cfitslibdir@ -lcfitsio $(LIBS)
|
---|
| 55 | LDLIBS=-L.. -latsop -latkern -latproc $(LIBS)
|
---|
[1480] | 56 | LIBDEPS=../libatsop.a ../libatkern.a ../libatproc.a
|
---|
| 57 | else
|
---|
| 58 | LDLIBS=-L.. -latkern -latproc @cfitslibdir@ -lcfitsio $(LIBS)
|
---|
| 59 | LIBDEPS=../libatkern.a ../libatproc.a
|
---|
| 60 | endif
|
---|
[1477] | 61 |
|
---|
| 62 | ifeq ($(MACHEROS),IRIX64)
|
---|
| 63 | ifeq ($(CXX), g++)
|
---|
| 64 | LDLIBS=@cfitslibdir@ -lcfitsio -L /usr/lib32/
|
---|
| 65 | endif
|
---|
| 66 | ifeq ($(CXX), CC)
|
---|
[2205] | 67 | CXXFLAGS = -O -prelink -ptused -64
|
---|
| 68 | CFLAGS = -O -64
|
---|
[1764] | 69 | # CXXFLAGS = -LANG:std -woff 1171,1174,1552 -O -OPT:Olimit=0
|
---|
| 70 | # CFLAGS = -O -OPT:Olimit=0
|
---|
[1477] | 71 | endif
|
---|
| 72 | endif
|
---|
| 73 |
|
---|
| 74 | ifeq ($(CXX), g++)
|
---|
| 75 | CC = gcc
|
---|
| 76 | endif
|
---|
| 77 |
|
---|
[1480] | 78 | ifeq ($(CXX), cxx)
|
---|
| 79 | CXXFLAGS := $(CXXFLAGS) -ptr ../cxx_repository
|
---|
| 80 | endif
|
---|
| 81 |
|
---|
| 82 |
|
---|
[1477] | 83 | default:
|
---|
| 84 | echo "no program specified"
|
---|
| 85 |
|
---|
| 86 | clean:
|
---|
| 87 | rm -f *.o
|
---|
| 88 | rm -rf rii_files ii_files cxxrep cxx_repository
|
---|
| 89 |
|
---|
[1480] | 90 | %: %.o $(FILES) $(LIBDEPS)
|
---|
[1663] | 91 | $(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@ -lm
|
---|
[1477] | 92 |
|
---|
| 93 | %.o:$(srcdir)/%.cc
|
---|
[1663] | 94 | $(COMPILE.cc) -o $@ $<
|
---|
[1477] | 95 |
|
---|
| 96 | %.o:$(srcdir)/%.c
|
---|
[1663] | 97 | $(COMPILE.c) -o $@ $<
|
---|
[1477] | 98 |
|
---|
| 99 |
|
---|
| 100 |
|
---|
| 101 | %.d: $(srcdir)/%.cc
|
---|
[1692] | 102 | $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \
|
---|
[1477] | 103 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
---|
| 104 | [ -s $@ ] || rm -f $@'
|
---|
| 105 |
|
---|
| 106 | %.d: $(srcdir)/%.c
|
---|
[1692] | 107 | $(SHELL) -ec '@gcc@ -MM $(CPPFLAGS) -I. $< \
|
---|
[1477] | 108 | | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
---|
| 109 | [ -s $@ ] || rm -f $@'
|
---|
| 110 |
|
---|
| 111 | include $(patsubst %.c,%.d,$(SRCFILES:.cc=.d))
|
---|
| 112 |
|
---|