2 # /**-------------------------------------------------------------------**
4 # **-------------------------------------------------------------------**
6 # **-------------------------------------------------------------------**
7 # ** First version: july 28th 2001 **
8 # **-------------------------------------------------------------------**/
10 # makefile.in (or makefile if generated) of PIP/PipLib. makefile.in is not a
11 # makefile, you must run the 'configure' shellscript to generate the makefile
12 # thanks to this file.
15 #/*****************************************************************************
16 # * Variables substituted with configure *
17 # *****************************************************************************/
21 # versions to compile.
23 # Target architecture and system
27 # Tool to create symbolic links.
29 # Tool to provide speed access to archives.
31 # Shared library extension
34 EXEC_SUFFIX
= @EXEC_SUFFIX@
36 EXTRA_FLAGS
= @EXTRA_FLAGS@
38 EXTRA_LIBS
= @EXTRA_LIBS@
42 INT_DFLAGS
= @INT_DFLAGS@
44 LONG_BITS
= @LONG_BITS@
46 LONG_DFLAGS
= @LONG_DFLAGS@
47 # Installation directory.
49 # Installation software.
53 # Packages to install.
54 TO_INSTALL
= @TO_INSTALL@
57 #/*****************************************************************************
58 # * PipLib's variables *
59 # *****************************************************************************/
62 # Directory of PipLib's sources (.c).
64 # Directory of PipLib's include (.h).
65 PIPLIB_INC
= .
/include
66 # Directory for object files and software and library before installation, its
67 # name depends on architecture and on operating system.
68 PIPLIB_OBJ
= .
/obj
$(BITS
)_
$(TARGET
)
69 # PipLib's installation subdirectories.
70 PIPLIB_INS_BIN
= $(PIPLIB_INS
)/bin
71 PIPLIB_INS_LIB
= $(PIPLIB_INS
)/lib
72 PIPLIB_INS_INC
= $(PIPLIB_INS
)/include
75 #/*****************************************************************************
76 # * Compiler and linker options *
77 # *****************************************************************************/
80 INCFLAGS
= -I
$(PIPLIB_INC
)
81 LDFLAGS
= $(EXTRA_LIBS
)
82 CFLAGS
= -c
$(INCFLAGS
) -fomit-frame-pointer
-O2
$(EXTRA_FLAGS
) $(DFLAGS
)
85 #/*****************************************************************************
87 # *****************************************************************************/
90 OBJ
= $(PIPLIB_OBJ
)/maind.o
$(PIPLIB_OBJ
)/piplib.o
$(PIPLIB_OBJ
)/integrer.o \
91 $(PIPLIB_OBJ
)/tab.o
$(PIPLIB_OBJ
)/traiter.o
$(PIPLIB_OBJ
)/sol.o
93 all : $(TO_BUILD
:%=%all)
96 $(MAKE
) "BITS=$(INT_BITS)" "DFLAGS=$(INT_DFLAGS)" tobuild
99 $(MAKE
) "BITS=$(LONG_BITS)" "DFLAGS=$(LONG_DFLAGS)" tobuild
101 tobuild
: $(PACKAGES
)
103 pip
: $(PIPLIB_OBJ
) $(OBJ
)
104 @echo
" /*-----------------------------------------------*"
105 @echo
" * MAKING PIP *"
106 @echo
" *-----------------------------------------------*/"
107 $(CC
) $(OBJ
) -o
$(PIPLIB_OBJ
)/pip
$(BITS
)$(EXEC_SUFFIX
) $(LDFLAGS
)
109 piplibshared
: $(PIPLIB_OBJ
) $(OBJ
)
110 @echo
" /*-----------------------------------------------*"
111 @echo
" * MAKING PipLib (shared) *"
112 @echo
" *-----------------------------------------------*/"
113 $(LD
) $(OBJ
) -o
$(PIPLIB_OBJ
)/libpiplib
$(BITS
).
$(SHEXT
).
$(VERSION
) \
114 -lc
-shared
-fPIC
$(LDFLAGS
)
117 piplibstatic
: $(PIPLIB_OBJ
) $(OBJ
)
118 @echo
" /*-----------------------------------------------*"
119 @echo
" * MAKING PipLib (static lib) *"
120 @echo
" *-----------------------------------------------*/"
121 $(AR
) q
$(PIPLIB_OBJ
)/libpiplib
$(BITS
).a.
$(VERSION
) $(OBJ
)
122 $(RANLIB
) $(PIPLIB_OBJ
)/libpiplib
$(BITS
).a.
$(VERSION
)
124 $(PIPLIB_OBJ
)/piplib.o
: $(PIPLIB_SRC
)/piplib.c
$(PIPLIB_INC
)/piplib
/piplib.h
125 $(CC
) $(CFLAGS
) $(PIPLIB_SRC
)/piplib.c \
126 -o
$(PIPLIB_OBJ
)/piplib.o
128 $(PIPLIB_OBJ
)/integrer.o
: $(PIPLIB_SRC
)/integrer.c \
129 $(PIPLIB_INC
)/piplib
/piplib.h
130 $(CC
) $(CFLAGS
) $(PIPLIB_SRC
)/integrer.c \
131 -o
$(PIPLIB_OBJ
)/integrer.o
133 $(PIPLIB_OBJ
)/maind.o
: $(PIPLIB_SRC
)/maind.c
$(PIPLIB_INC
)/piplib
/piplib.h
134 $(CC
) $(CFLAGS
) $(PIPLIB_SRC
)/maind.c \
135 -o
$(PIPLIB_OBJ
)/maind.o
137 $(PIPLIB_OBJ
)/tab.o
: $(PIPLIB_SRC
)/tab.c
$(PIPLIB_INC
)/piplib
/piplib.h
138 $(CC
) $(CFLAGS
) $(PIPLIB_SRC
)/tab.c \
139 -o
$(PIPLIB_OBJ
)/tab.o
141 $(PIPLIB_OBJ
)/traiter.o
: $(PIPLIB_SRC
)/traiter.c
$(PIPLIB_INC
)/piplib
/piplib.h
142 $(CC
) $(CFLAGS
) $(PIPLIB_SRC
)/traiter.c \
143 -o
$(PIPLIB_OBJ
)/traiter.o
145 $(PIPLIB_OBJ
)/sol.o
: $(PIPLIB_SRC
)/sol.c
$(PIPLIB_INC
)/piplib
/piplib.h
146 $(CC
) $(CFLAGS
) $(PIPLIB_SRC
)/sol.c \
147 -o
$(PIPLIB_OBJ
)/sol.o
151 $(INSTALL
) -d
$(PIPLIB_OBJ
)
155 @echo
" /*-----------------------------------------------*"
156 @echo
" * CLEANING PIP/PipLib *"
157 @echo
" *-----------------------------------------------*/"
161 @echo
" /*-----------------------------------------------*"
162 @echo
" * DISTCLEANING PIP/PipLib *"
163 @echo
" *-----------------------------------------------*/"
164 $(RM
) -f config.cache config.log config.status Makefile
167 install:: $(TO_BUILD
:%=%install)
170 $(MAKE
) "BITS=$(INT_BITS)" "DFLAGS=$(INT_DFLAGS)" toinstall
172 $(LONG_BITS
)install :
173 $(MAKE
) "BITS=$(LONG_BITS)" "DFLAGS=$(LONG_DFLAGS)" toinstall
175 toinstall
: $(TO_INSTALL
)
178 @echo
" /*-----------------------------------------------*"
179 @echo
" * INSTALLING PIP *"
180 @echo
" *-----------------------------------------------*/"
181 ($(INSTALL
) -d
$(PIPLIB_INS_BIN
) && \
182 $(INSTALL
) $(PIPLIB_OBJ
)/pip
$(BITS
)$(EXEC_SUFFIX
) $(PIPLIB_INS_BIN
))
185 ($(INSTALL
) -d
$(PIPLIB_INS_INC
) && \
186 $(INSTALL
) -d
$(PIPLIB_INS_INC
)/piplib
&& \
187 $(INSTALL
) $(PIPLIB_INC
)/piplib
/* $(PIPLIB_INS_INC
)/piplib
)
189 install_piplibshared
: install_preparation
190 @echo
" /*-----------------------------------------------*"
191 @echo
" * INSTALLING PipLib (shared) *"
192 @echo
" *-----------------------------------------------*/"
193 rm -f
$(PIPLIB_INS_LIB
)/libpiplib
$(BITS
).
$(SHEXT
)
194 ($(INSTALL
) -d
$(PIPLIB_INS_LIB
) && \
195 $(INSTALL
) $(PIPLIB_OBJ
)/libpiplib
$(BITS
).
$(SHEXT
).
$(VERSION
) \
196 $(PIPLIB_INS_LIB
) && \
197 $(LN_S
) $(PIPLIB_INS_LIB
)/libpiplib
$(BITS
).
$(SHEXT
).
$(VERSION
) \
198 $(PIPLIB_INS_LIB
)/libpiplib
$(BITS
).
$(SHEXT
))
200 install_piplibstatic
: install_preparation
201 @echo
" /*-----------------------------------------------*"
202 @echo
" * INSTALLING PipLib (static) *"
203 @echo
" *-----------------------------------------------*/"
204 rm -f
$(PIPLIB_INS_LIB
)/libpiplib
$(BITS
).a
205 ($(INSTALL
) -d
$(PIPLIB_INS_LIB
) && \
206 $(INSTALL
) $(PIPLIB_OBJ
)/libpiplib
$(BITS
).a.
$(VERSION
) \
207 $(PIPLIB_INS_LIB
) && \
208 $(LN_S
) $(PIPLIB_INS_LIB
)/libpiplib
$(BITS
).a.
$(VERSION
) \
209 $(PIPLIB_INS_LIB
)/libpiplib
$(BITS
).a
)
212 @echo
" /*-----------------------------------------------*"
213 @echo
" * UNINSTALLING PIP/PipLib *"
214 @echo
" *-----------------------------------------------*/"
215 rm -f
$(PIPLIB_INS_LIB
)/libpiplib
*
216 rm -rf
$(PIPLIB_INS_INC
)/piplib
217 rm -f
$(PIPLIB_INS_BIN
)/pip32
$(EXEC_SUFFIX
) \
218 $(PIPLIB_INS_BIN
)/pip64
$(EXEC_SUFFIX
)
222 tar cvf piplib-
$(VERSION
).
tar piplib-
$(VERSION
) && \
223 gzip piplib-
$(VERSION
).
tar)