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