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