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