source: Sophya/trunk/SophyaPI/PI/pimak@ 16

Last change on this file since 16 was 16, checked in by eros, 29 years ago

add pimak + starreco dans pidemo (cmv)

File size: 3.8 KB
Line 
1CC := gcc
2CXX := g++
3# General setup GNU Makefile for EROS. To be included in all makefiles.
4# Define makefile variables according to CPU
5# MACHEROSD = `uname | sed 's/-//'` i.e. { AIX HPUX OSF1 ULTRIX }
6#
7# Makefile variables set are:
8# - Path to Exec, Include, Libs, Obj directories (from EROSBASEREP env. var.)
9# i.e. variables LIB, OBJ, EXE, INC
10#---------------------------------------------------------------------------
11
12# define MACHEROS from uname
13MACHEROS := $(shell echo `uname`)
14# define the -D option
15MACHEROSD := $(shell echo `uname | sed 's/-//'`)
16
17#-
18#- Optimization option different for HP...
19ifeq (${MACHEROS},HP-UX)
20 O := +O
21else
22 O := -O
23endif
24#-
25#- Define Makefile paths
26#-
27 PP := ${EROSBASEREP}/${MACHEROS}/
28 LIB := ${PP}/Libs/
29 SLB := ${PP}/ShLibs/
30 OBJ := ${PP}/Objs/
31 EXE := ${PP}/Exec/
32 INC := ${EROSBASEREP}/Include/
33 CCI := ${INC}/CInc/
34 CXI := ${INC}/CxxInc/
35#--
36
37#-
38#- Define default compilation flags
39#--
40ifeq (${MACHEROS},HP-UX)
41 CFLAGS := -Aa
42 FFLAGS := -Aa -I${INC} -D${MACHEROSD}
43 CPPFLAGS := -I${INC} -D${MACHEROSD} \
44 -D_INCLUDE_POSIX_SOURCE -D_INCLUDE_XOPEN_SOURCE
45else
46 FFLAGS := -I${INC} -D${MACHEROSD}
47 CPPFLAGS := -I${INC} -D${MACHEROSD}
48endif
49AR := ar
50ARFLAGS := -rcs
51
52ifeq ($(CC), gcc)
53CFLAGS := -g -O -Wall -Wpointer-arith \
54 -Wmissing-prototypes -Wsynth -I$(INC)
55//CXXFLAGS := $(CFLAGS) -fno-implicit-templates -I$(CXI)
56CXXFLAGS := $(CFLAGS) -I$(CXI)
57endif
58
59#- redefine implicit rule. Les .o sont dans $(OBJ).
60$(OBJ)%.o:%.c
61 $(COMPILE.c) -o $@ $<
62
63$(OBJ)%.o:%.cc
64 $(COMPILE.cc) -o $@ $<
65
66$(OBJ)%.o:%.f
67 $(COMPILE.f) -o $@ $<
68
69#OSF1
70#LDFC est f77
71#LDFCFLAGS est rien
72
73#parfois
74#LDFC est cc
75#LDFCFLAGS est -ltruc
76
77#------------------------------------------------- End of Makefile.h -------
78all : piapp
79
80piapp : $(EXE)piapp $(SLB)piup.so user.so
81
82
83$(EXE)piapp : $(OBJ)pidemo.o $(SLB)libPI.so $(SLB)libOuIm.so \
84 $(SLB)liberosc.so $(SLB)libStarReco.so
85 cc -call_shared -o $(EXE)piapp $(OBJ)pidemo.o \
86 -L$(SLB) -lPI -lOuIm -lerosc -lStarReco \
87 -lgcxx -lXm -lXt -lX11 -lm
88$(SLB)piup.so : $(OBJ)piup_def.o \
89 $(SLB)libOuIm.so $(SLB)liberosc.so
90 ld -shared -o $(SLB)piup.so -all $(OBJ)piup_def.o \
91 -none -L$(SLB) -lOuIm -lerosc -lgcxx -lm -lc
92
93user.so : $(OBJ)piup.o \
94 $(SLB)libOuIm.so $(SLB)liberosc.so
95 ld -shared -o user.so -all $(OBJ)piup.o \
96 -none -L$(SLB) -lOuIm -lerosc -lgcxx -lm -lc
97
98
99$(OBJ)pidemo.o: ./pidemo.cc \
100 $(INC)perrors.h \
101 $(INC)exceptions.h \
102 $(INC)defs.h \
103 $(INC)fitsimage.h \
104 $(INC)cimage.h \
105 $(INC)rzimage.h \
106 $(INC)rzvect.h \
107 $(INC)machine.h \
108 $(INC)datatypes.h \
109 $(INC)fitsheader.h \
110 $(INC)fitskeys.h pidemo.h \
111 pisysdep.h piapplx.h piapplgen.h pimsghandler.h picontainerx.h \
112 picontainergen.h piwdgx.h piwdggen.h pimenubarx.h pimenubargen.h \
113 pimenux.h pimenugen.h piwindowx.h piwindowgen.h pioptmenux.h \
114 pioptmenugen.h pistdwdgx.h pistdwdggen.h pifilechox.h pifilechogen.h \
115 piimage.h $(INC)lut.h \
116 pipixmapx.h pipixmapgen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
117 picmapgen.h pihisto.h piscdrawwdg.h \
118 $(INC)histos.h \
119 $(INC)peida.h \
120 $(INC)utils.h pidrawwin.h \
121 $(INC)piup.h
122$(OBJ)piup.o: piup.cc piup.h \
123 $(INC)perrors.h \
124 $(INC)exceptions.h \
125 $(INC)defs.h \
126 $(INC)fitsimage.h \
127 $(INC)cimage.h \
128 $(INC)rzimage.h \
129 $(INC)rzvect.h \
130 $(INC)machine.h \
131 $(INC)datatypes.h \
132 $(INC)fitsheader.h \
133 $(INC)fitskeys.h \
134 $(INC)utils.h $(INC)peida.h
135$(OBJ)piup_def.o: piup_def.cc piup.h \
136 $(INC)perrors.h \
137 $(INC)exceptions.h \
138 $(INC)defs.h \
139 $(INC)fitsimage.h \
140 $(INC)cimage.h \
141 $(INC)rzimage.h \
142 $(INC)rzvect.h \
143 $(INC)machine.h \
144 $(INC)datatypes.h \
145 $(INC)fitsheader.h \
146 $(INC)fitskeys.h \
147 $(INC)utils.h $(INC)peida.h
148
Note: See TracBrowser for help on using the repository browser.