piplib 1.0
[piplib.git] / Makefile.in
blob84135869bafc218dca7c32917b9fe4642e148300
2 # /**-------------------------------------------------------------------**
3 # ** PIP/PipLib **
4 # **-------------------------------------------------------------------**
5 # ** makefile.in **
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 # *****************************************************************************/
19 # PipLib's version.
20 VERSION = @VERSION@
21 # versions to compile.
22 TO_BUILD = @TO_BUILD@
23 # Target architecture and system
24 TARGET = @target@
25 # C compiler.
26 CC = @CC@
27 # Tool to create symbolic links.
28 LN_S = @LN_S@
29 # Tool to provide speed access to archives.
30 RANLIB = @RANLIB@
31 # Shared library extension
32 SHEXT = @SHEXT@
33 # Executable suffix
34 EXEC_SUFFIX = @EXEC_SUFFIX@
35 # Extra flags
36 EXTRA_FLAGS = @EXTRA_FLAGS@
37 # Extra libraries
38 EXTRA_LIBS = @EXTRA_LIBS@
39 # Bits for integers
40 INT_BITS = @INT_BITS@
41 # Flags fos integers
42 INT_DFLAGS = @INT_DFLAGS@
43 # Bits for long long
44 LONG_BITS = @LONG_BITS@
45 # Flags fos long long
46 LONG_DFLAGS = @LONG_DFLAGS@
47 # Installation directory.
48 PIPLIB_INS = @prefix@
49 # Installation software.
50 INSTALL = @INSTALL@
51 # Packages to build.
52 PACKAGES = @PACKAGES@
53 # Packages to install.
54 TO_INSTALL = @TO_INSTALL@
57 #/*****************************************************************************
58 # * PipLib's variables *
59 # *****************************************************************************/
62 # Directory of PipLib's sources (.c).
63 PIPLIB_SRC = ./source
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 #/*****************************************************************************
86 # * Rules *
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)
95 $(INT_BITS)all :
96 $(MAKE) "BITS=$(INT_BITS)" "DFLAGS=$(INT_DFLAGS)" tobuild
98 $(LONG_BITS)all :
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)
115 $(LDCONFIG)
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
150 $(PIPLIB_OBJ):
151 $(INSTALL) -d $(PIPLIB_OBJ)
154 clean :
155 @echo " /*-----------------------------------------------*"
156 @echo " * CLEANING PIP/PipLib *"
157 @echo " *-----------------------------------------------*/"
158 $(RM) -rf obj*
160 distclean: clean
161 @echo " /*-----------------------------------------------*"
162 @echo " * DISTCLEANING PIP/PipLib *"
163 @echo " *-----------------------------------------------*/"
164 $(RM) -f config.cache config.log config.status Makefile
167 install:: $(TO_BUILD:%=%install)
169 $(INT_BITS)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)
177 install_pip:
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))
184 install_preparation:
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)
211 uninstall :
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)
220 tgz: distclean
221 (cd .. && \
222 tar cvf piplib-$(VERSION).tar piplib-$(VERSION) && \
223 gzip piplib-$(VERSION).tar)