[66502b8] | 1 | ################################################################# |
---|
| 2 | ### File: Makefile.in |
---|
| 3 | ### Purpose: Makefile for omalloc |
---|
| 4 | ### Author: obachman@mathematik.uni-kl.de (Olaf Bachmann) |
---|
| 5 | ### Created: 11/99 |
---|
[82e3b3] | 6 | ### Version: $Id: Makefile.in,v 1.15 2002-03-08 12:23:05 hannes Exp $ |
---|
[66502b8] | 7 | ################################################################# |
---|
| 8 | |
---|
| 9 | SHELL = /bin/sh |
---|
[3df5b10] | 10 | VERSION = @VERSION@ |
---|
[66502b8] | 11 | |
---|
| 12 | ## |
---|
| 13 | ## various paths |
---|
| 14 | ## |
---|
[3df5b10] | 15 | prefix = @prefix@ |
---|
| 16 | exec_prefix = @exec_prefix@ |
---|
| 17 | |
---|
[66502b8] | 18 | # header file is installed here |
---|
| 19 | includedir = @includedir@ |
---|
| 20 | # library is installed here |
---|
| 21 | libdir = @libdir@ |
---|
| 22 | |
---|
| 23 | ## |
---|
| 24 | ## various programs |
---|
| 25 | ## |
---|
| 26 | @SET_MAKE@ |
---|
| 27 | CC = @CC@ |
---|
| 28 | AR = @AR@ |
---|
| 29 | RANLIB = @RANLIB@ |
---|
| 30 | PERL = @PERL@ |
---|
[be7466] | 31 | LN_S = @LN_S@ |
---|
[3df5b10] | 32 | INSTALL = @INSTALL@ |
---|
[13fe1b] | 33 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
---|
[3df5b10] | 34 | INSTALL_DATA = @INSTALL_DATA@ |
---|
| 35 | MKINSTALLDIRS = ./mkinstalldirs |
---|
[66502b8] | 36 | ## |
---|
| 37 | ## compiler and linker options |
---|
| 38 | ## |
---|
[13fe1b] | 39 | CFLAGS = @CFLAGS@ |
---|
[3df5b10] | 40 | CPPFLAGS = -I. @CPPFLAGS@ |
---|
| 41 | DEFS = @DEFS@ |
---|
[66502b8] | 42 | |
---|
[be7466] | 43 | ## |
---|
| 44 | ## external config and and malloc files |
---|
| 45 | ## |
---|
| 46 | EXTERNAL_CONFIG_SOURCE = @EXTERNAL_CONFIG_SOURCE@ |
---|
[3df5b10] | 47 | EXTERNAL_CONFIG_HEADER = @EXTERNAL_CONFIG_HEADER@ |
---|
[be7466] | 48 | |
---|
| 49 | OM_MALLOC_HEADER = @OM_MALLOC_HEADER@ |
---|
| 50 | OM_MALLOC_SOURCE = @OM_MALLOC_SOURCE@ |
---|
| 51 | |
---|
[66502b8] | 52 | ## |
---|
| 53 | ## End configuration dependend stuff |
---|
| 54 | ################################################################# |
---|
| 55 | |
---|
| 56 | ### |
---|
| 57 | ### file sets |
---|
| 58 | ### |
---|
| 59 | |
---|
[be7466] | 60 | # normal C source files |
---|
[3df5b10] | 61 | CSOURCES= \ |
---|
| 62 | omBinPage.c omList.c omAllocEmulate.c omDebug.c \ |
---|
[e6ad6a7] | 63 | om_Alloc.c omDebugCheck.c omOpts.c omGetBackTrace.c\ |
---|
[3df5b10] | 64 | omAllocSystem.c omError.c omStats.c omRet2Info.c \ |
---|
| 65 | omBin.c omFindExec.c omDebugTrack.c \ |
---|
[d83977] | 66 | omalloc_provide.c omAllocFunc.c |
---|
[be7466] | 67 | |
---|
| 68 | ifdef EXTERNAL_CONFIG_SOURCE |
---|
| 69 | GSOURCES := ${GSOURCES} omExternalConfig.c |
---|
| 70 | endif |
---|
| 71 | ifdef OM_MALLOC_SOURCE |
---|
| 72 | GSOURCES := ${GSOURCES} omMalloc.c |
---|
| 73 | endif |
---|
[66502b8] | 74 | |
---|
| 75 | # ASO_SOURCES |
---|
[13fe1b] | 76 | ASO_SOURCES = |
---|
[66502b8] | 77 | |
---|
[a90dc0] | 78 | HEADERS= mylimits.h omlimits.h \ |
---|
[8d0069] | 79 | om_Alloc.h omList.h omDerivedConfig.h \ |
---|
[be7466] | 80 | omAllocDecl.h omConfig.h omMemOps.h \ |
---|
[3df5b10] | 81 | omDebug.h omOpts.h omInlineDecl.h \ |
---|
[be7466] | 82 | omAllocPrivate.h omError.h omPage.h \ |
---|
| 83 | omAllocSystem.h omFindExec.h omStats.h \ |
---|
| 84 | omBin.h omDefaultConfig.h omStructs.h \ |
---|
[3df5b10] | 85 | omBinPage.h omInline.h omGetBackTrace.h \ |
---|
[d83977] | 86 | omReturn.h omRet2Info.h omAllocFunc.h |
---|
[be7466] | 87 | |
---|
[13fe1b] | 88 | OBJS := $(CSOURCES:.c=.o) $(GSOURCES:.c=.o) |
---|
| 89 | OBJS_NDEBUG := $(CSOURCES:.c=.o_ndebug) $(GSOURCES:.c=.o_ndebug) |
---|
[66502b8] | 90 | |
---|
[be7466] | 91 | SOURCES=${CSOURCES} omGetPageSize.h omMallocSystem.h gmalloc.c dlmalloc.h dlmalloc.c \ |
---|
[3df5b10] | 92 | omMmap.c gmalloc.c omTables.c pmalloc.h pmalloc.c omalloc.c omalloc_debug.c \ |
---|
[13fe1b] | 93 | $(TESTSOURCES) omtTestAlloc.c |
---|
[66502b8] | 94 | |
---|
[13fe1b] | 95 | ASO_OBJS := $(ASO_SOURCES:.aso.cc=.aso) |
---|
[66502b8] | 96 | |
---|
[3df5b10] | 97 | DISTFILES=$(SOURCES) $(HEADERS) omtTest.h makeheader.pl Makefile.in \ |
---|
[a90dc0] | 98 | omConfig.h.in omlimits.h.in mylimits.h configure.in mkinstalldirs install-sh configure |
---|
[3df5b10] | 99 | |
---|
[66502b8] | 100 | ## |
---|
| 101 | ## Build Targets |
---|
| 102 | ## |
---|
[a90dc0] | 103 | %.o: %.c omConfig.h omlimits.h omTables.h omalloc.h omTables.inc |
---|
[66502b8] | 104 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< |
---|
| 105 | |
---|
[a90dc0] | 106 | %.o_ndebug: %.c omConfig.h omlimits.h mylimits.h omTables.h omalloc.h omTables.inc |
---|
[3df5b10] | 107 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -DOM_NDEBUG -c $< -o $@ |
---|
| 108 | |
---|
[13fe1b] | 109 | %.aso.o: %.aso.cc mmtables.inc |
---|
[66502b8] | 110 | ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} $< -o $@ |
---|
| 111 | .PRECIOUS: %.aso.o |
---|
| 112 | |
---|
| 113 | %.aso: %.aso.o |
---|
| 114 | ./$< > $@ |
---|
| 115 | |
---|
[3df5b10] | 116 | all: libomalloc.a libomalloc_ndebug.a omalloc.h omalloc.o omalloc_debug.o |
---|
[66502b8] | 117 | |
---|
| 118 | lib: libomalloc.a |
---|
| 119 | |
---|
[a90dc0] | 120 | libomalloc.a: $(OBJS) Makefile omConfig.h omlimits.h mylimits.h |
---|
[66502b8] | 121 | rm -f $@ |
---|
[13fe1b] | 122 | $(AR) cr $@ $(OBJS) |
---|
[66502b8] | 123 | $(RANLIB) $@ |
---|
| 124 | |
---|
[a90dc0] | 125 | libomalloc_ndebug.a: $(OBJS_NDEBUG) Makefile omConfig.h omlimits.h mylimits.h |
---|
[3df5b10] | 126 | rm -f $@ |
---|
[13fe1b] | 127 | $(AR) cr $@ $(OBJS_NDEBUG) |
---|
[3df5b10] | 128 | $(RANLIB) $@ |
---|
| 129 | |
---|
[13fe1b] | 130 | omalloc.h: $(HEADERS) |
---|
[2c72eb] | 131 | $(PERL) makeheader.pl -a om_Alloc.h $@ |
---|
[3df5b10] | 132 | |
---|
| 133 | omalloc.o: omalloc.c |
---|
| 134 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -DOM_NDEBUG -c $< -o $@ |
---|
| 135 | |
---|
[13fe1b] | 136 | omalloc_debug.o: omalloc_debug.c |
---|
[3df5b10] | 137 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< -o $@ |
---|
[66502b8] | 138 | |
---|
| 139 | omTables.inc: omTables |
---|
| 140 | ./omTables > $@ |
---|
| 141 | |
---|
[3df5b10] | 142 | omTables.h: omTables |
---|
| 143 | ./omTables 1 >$@ |
---|
| 144 | |
---|
[a90dc0] | 145 | omTables: omAllocPrivate.h omConfig.h omTables.c omlimits.h mylimits.h |
---|
[66502b8] | 146 | ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -DOM_GENERATE_INC omTables.c -o omTables |
---|
| 147 | |
---|
[be7466] | 148 | # |
---|
| 149 | # targets to generate omExternalConfig.[c,h] |
---|
| 150 | # |
---|
[2c72eb] | 151 | om_Alloc.h: omMalloc.h |
---|
[66502b8] | 152 | |
---|
[be7466] | 153 | ifdef OM_MALLOC_SOURCE |
---|
[13fe1b] | 154 | omMalloc.c: $(OM_MALLOC_SOURCE) |
---|
[be7466] | 155 | cp $(OM_MALLOC_SOURCE) omMalloc.c |
---|
| 156 | endif |
---|
| 157 | ifdef EXTERNAL_CONFIG_SOURCE |
---|
| 158 | omExternalConfig.c: $(EXTERNAL_CONFIG_SOURCE) |
---|
| 159 | cp $(EXTERNAL_CONFIG_SOURCE) omExternalConfig.c |
---|
| 160 | endif |
---|
[3df5b10] | 161 | |
---|
[be7466] | 162 | ifdef EXTERNAL_CONFIG_HEADER |
---|
[3df5b10] | 163 | omExternalConfig.h: $(EXTERNAL_CONFIG_HEADER) |
---|
| 164 | cp $(EXTERNAL_CONFIG_HEADER) omExternalConfig.h |
---|
| 165 | omDerivedConfig.h: omExternalConfig.h |
---|
[be7466] | 166 | endif |
---|
| 167 | |
---|
| 168 | # |
---|
| 169 | # configure related stuff |
---|
| 170 | # |
---|
[a90dc0] | 171 | omConfig.h omMalloc.h omlimits.h mylimits.h: stamp-h |
---|
[be7466] | 172 | |
---|
[a90dc0] | 173 | stamp-h : config.status omConfig.h.in omlimits.h.in ${OM_MALLOC_HEADER} |
---|
| 174 | CONFIG_FILES= CONFIG_HEADERS="omConfig.h omlimits.h omMalloc.h:${OM_MALLOC_HEADER}" ./config.status |
---|
[66502b8] | 175 | |
---|
| 176 | Makefile: Makefile.in config.status |
---|
| 177 | CONFIG_FILES="Makefile" CONFIG_HEADERS= ./config.status |
---|
| 178 | |
---|
| 179 | config.status: configure |
---|
| 180 | ./config.status --recheck |
---|
| 181 | |
---|
| 182 | configure: configure.in |
---|
| 183 | @echo "WARNING: You need to rerun autoconf. I am proceeding, for now." |
---|
| 184 | @touch configure |
---|
| 185 | # autoconf |
---|
| 186 | |
---|
| 187 | ## |
---|
| 188 | ## install targets |
---|
| 189 | ## |
---|
[ee2c29] | 190 | install_all: all libomalloc_p.a |
---|
[66502b8] | 191 | $(MKINSTALLDIRS) $(libdir) |
---|
| 192 | $(MKINSTALLDIRS) $(includedir) |
---|
| 193 | $(INSTALL_DATA) libomalloc.a $(libdir) |
---|
| 194 | $(RANLIB) $(libdir)/libomalloc.a |
---|
[3df5b10] | 195 | $(INSTALL_DATA) libomalloc_ndebug.a $(libdir) |
---|
| 196 | $(RANLIB) $(libdir)/libomalloc_ndebug.a |
---|
| 197 | $(INSTALL_DATA) libomalloc_p.a $(libdir) |
---|
| 198 | $(RANLIB) $(libdir)/libomalloc_p.a |
---|
| 199 | $(INSTALL_DATA) omalloc.o omalloc_debug.o $(libdir) |
---|
| 200 | $(INSTALL_DATA) omalloc.h omalloc.c $(includedir) |
---|
[a90dc0] | 201 | $(INSTALL_DATA) omlimits.h mylimits.h omalloc.c $(includedir) |
---|
[3df5b10] | 202 | |
---|
[ebcda0] | 203 | install: libomalloc_ndebug.a omalloc.o |
---|
[ee2c29] | 204 | $(MKINSTALLDIRS) $(libdir) |
---|
| 205 | $(MKINSTALLDIRS) $(includedir) |
---|
| 206 | $(INSTALL_DATA) libomalloc_ndebug.a $(libdir) |
---|
| 207 | $(RANLIB) $(libdir)/libomalloc_ndebug.a |
---|
| 208 | $(INSTALL_DATA) omalloc.o $(libdir) |
---|
| 209 | $(INSTALL_DATA) omalloc.h omalloc.c $(includedir) |
---|
| 210 | $(INSTALL_DATA) omlimits.h mylimits.h omalloc.c $(includedir) |
---|
[66502b8] | 211 | |
---|
[13fe1b] | 212 | uninstall: |
---|
[3df5b10] | 213 | rm -f $(includedir)/omalloc.h $(includedir)/omalloc.c |
---|
| 214 | rm -f $(libdir)/libomalloc.a $(libdir)/libomalloc_ndebug.a $(libdir)/libomalloc_p.a $(libdir)/omalloc.o $(libdir)/omalloc_debug.o |
---|
| 215 | |
---|
| 216 | ## |
---|
| 217 | ## dist targets |
---|
| 218 | ## |
---|
| 219 | dist: omalloc-$(VERSION).tgz |
---|
| 220 | omalloc-$(VERSION).tgz: $(DISTFILES) |
---|
| 221 | rm -rf omalloc-$(VERSION) |
---|
| 222 | mkdir omalloc-$(VERSION) |
---|
| 223 | cp $(DISTFILES) omalloc-$(VERSION) |
---|
| 224 | tar czf omalloc-$(VERSION).tgz omalloc-$(VERSION) |
---|
[66502b8] | 225 | |
---|
| 226 | ## |
---|
| 227 | ## clean targest |
---|
| 228 | ## |
---|
[13fe1b] | 229 | mostlyclean: |
---|
[3df5b10] | 230 | -rm -f core *.d *.o *.og *.op *_d.c *.ob *.a depend *.out *.tgz omTables *.o_ndebug *.gp *.gprof |
---|
| 231 | -rm -f omtTest omtTest_* libomalloc* *.bprof omtTest omtTest_* |
---|
| 232 | -rm -f omMalloc.c omExternalConfig.h omExternalConfig.c |
---|
[66502b8] | 233 | |
---|
| 234 | clean: mostlyclean |
---|
| 235 | |
---|
| 236 | distclean: clean |
---|
[82e3b3] | 237 | -rm -f *~ .\#* stamp-h omMalloc.h |
---|
[3df5b10] | 238 | rm -rf omalloc-$(VERSION) |
---|
[a90dc0] | 239 | -rm -f omConfig.h omlimits.h Makefile TAGS* tags config.status config.cache config.log |
---|
[66502b8] | 240 | |
---|
| 241 | srcclean: distclean |
---|
| 242 | |
---|
[13fe1b] | 243 | maintainer-clean: distclean |
---|
[66502b8] | 244 | rm configure |
---|
| 245 | |
---|
[be7466] | 246 | .PHONY: TAGS |
---|
| 247 | |
---|
[a90dc0] | 248 | TAGS: omConfig.h.in omlimits.h.in |
---|
| 249 | etags omConfig.h.in omlimits.h.in $(SOURCES) $(HEADERS) |
---|
[be7466] | 250 | |
---|
[3df5b10] | 251 | ## |
---|
| 252 | ## check |
---|
| 253 | ## |
---|
| 254 | |
---|
| 255 | check: omtTest omtTest_ndebug |
---|
| 256 | ./omtTest |
---|
| 257 | ./omtTest_ndebug |
---|
| 258 | |
---|
[66502b8] | 259 | ## |
---|
| 260 | ## Below here is stuff for developpers |
---|
| 261 | ################################################################# |
---|
| 262 | |
---|
| 263 | ## |
---|
| 264 | ## compiler and linker options for debug version |
---|
| 265 | ## |
---|
| 266 | |
---|
| 267 | CCG = gcc |
---|
| 268 | CCM = gcc -MM -DGENERATE_DEPEND |
---|
| 269 | |
---|
[9289f11] | 270 | CFLAGSG = -g -O -fno-inline-functions -Wall |
---|
[66502b8] | 271 | DEFSG = @DEFS@ |
---|
| 272 | |
---|
[be7466] | 273 | OBJG := $(CSOURCES:.c=.og) $(GSOURCES:.c=.og) |
---|
[66502b8] | 274 | |
---|
[a90dc0] | 275 | %.og: %.c omConfig.h omTables.h omalloc.h mylimits.h omlimits.h |
---|
[66502b8] | 276 | $(CCG) ${CFLAGSG} ${CPPFLAGS} ${DEFSG} -c $< -o $@ |
---|
| 277 | |
---|
| 278 | libg: libomalloc_g.a |
---|
| 279 | |
---|
[a90dc0] | 280 | libomalloc_g.a: $(OBJG) Makefile omConfig.h mylimits.h omlimits.h |
---|
[66502b8] | 281 | rm -f $@ |
---|
[13fe1b] | 282 | $(AR) cr $@ $(OBJG) |
---|
[66502b8] | 283 | $(RANLIB) $@ |
---|
| 284 | |
---|
| 285 | |
---|
| 286 | ## |
---|
[3df5b10] | 287 | ## expanded macros |
---|
[66502b8] | 288 | ## |
---|
[3df5b10] | 289 | OBJD := $(CSOURCES:%.c=%_d.og) $(GSOURCES:%.c=%_d.og) |
---|
[66502b8] | 290 | |
---|
[a90dc0] | 291 | %_d.c : %.c omConfig.h omTables.h omalloc.h mylimits.h omlimits.h |
---|
[66502b8] | 292 | $(CCG) -E -P $< | $(PERL) -p -e 's/;/;\n/g' | $(PERL) -p -e 's/\{/\n\{/g' | $(PERL) -p -e 's/\}/\n\}/g' > $@ |
---|
| 293 | .PRECIOUS: %_d.c |
---|
| 294 | |
---|
| 295 | libd: libomalloc_d.a |
---|
| 296 | |
---|
[a90dc0] | 297 | libomalloc_d.a: $(OBJD) Makefile omConfig.h mylimits.h omlimits.h |
---|
[66502b8] | 298 | rm -f $@ |
---|
[13fe1b] | 299 | $(AR) cr $@ $(OBJD) |
---|
[66502b8] | 300 | $(RANLIB) $@ |
---|
| 301 | |
---|
[be7466] | 302 | #################################################### |
---|
| 303 | ## compiler and linker options for profile version |
---|
| 304 | ## |
---|
| 305 | |
---|
| 306 | CCP = gcc |
---|
| 307 | |
---|
[13fe1b] | 308 | CFLAGSP = -g -pg -O3 -a |
---|
[be7466] | 309 | DEFSP = @DEFS@ |
---|
| 310 | |
---|
| 311 | OBJP := $(CSOURCES:.c=.op) $(GSOURCES:.c=.op) |
---|
| 312 | |
---|
| 313 | |
---|
| 314 | ## |
---|
| 315 | ## Profile Targets |
---|
| 316 | ## |
---|
[a90dc0] | 317 | %.op: %.c omConfig.h omTables.h omalloc.h mylimits.h omlimits.h |
---|
[be7466] | 318 | $(CCP) ${CFLAGSP} ${CPPFLAGS} ${DEFSP} -c $< -o $@ |
---|
| 319 | |
---|
| 320 | libp: libomalloc_p.a |
---|
| 321 | |
---|
[a90dc0] | 322 | libomalloc_p.a: $(OBJP) Makefile omConfig.h mylimits.h omlimits.h |
---|
[be7466] | 323 | rm -f $@ |
---|
[13fe1b] | 324 | $(AR) cr $@ $(OBJP) |
---|
[be7466] | 325 | $(RANLIB) $@ |
---|
| 326 | |
---|
| 327 | #################################################### |
---|
| 328 | ## compiler and linker options for bprof version |
---|
| 329 | ## |
---|
| 330 | |
---|
| 331 | CCB = gcc |
---|
| 332 | |
---|
[9289f11] | 333 | CFLAGSB = -g -O3 |
---|
[be7466] | 334 | DEFSB = @DEFS@ |
---|
[66502b8] | 335 | |
---|
| 336 | ## |
---|
[be7466] | 337 | ## .og files for having -O and -g object versions available at the same time |
---|
| 338 | ## |
---|
| 339 | OBJB := $(CSOURCES:.c=.ob) $(GSOURCES:.c=.ob) |
---|
| 340 | |
---|
| 341 | |
---|
| 342 | ## |
---|
| 343 | ## Profile Targets |
---|
| 344 | ## |
---|
[a90dc0] | 345 | %.ob: %.c omConfig.h omTables.h omalloc.h mylimits.h omlimits.h |
---|
[be7466] | 346 | $(CCB) ${CFLAGSB} ${CPPFLAGS} ${DEFSB} -c $< -o $@ |
---|
| 347 | |
---|
| 348 | libb: libomalloc_b.a |
---|
| 349 | |
---|
[a90dc0] | 350 | libomalloc_b.a: $(OBJB) Makefile omConfig.h mylimits.h omlimits.h |
---|
[be7466] | 351 | rm -f $@ |
---|
[13fe1b] | 352 | $(AR) cr $@ $(OBJB) |
---|
[be7466] | 353 | $(RANLIB) $@ |
---|
| 354 | |
---|
| 355 | #################################################### |
---|
[66502b8] | 356 | ## Test program |
---|
| 357 | ## |
---|
[13fe1b] | 358 | TESTSOURCES = omtTest.c omtTestReal.c omtTestDebug.c omtTestKeep.c omtTestError.c |
---|
[66502b8] | 359 | |
---|
[13fe1b] | 360 | TEST_D := $(TESTSOURCES:.c=_d.og) |
---|
| 361 | omtTest_d: libd $(TEST_D) |
---|
[3df5b10] | 362 | $(CCG) ${CFLAGSG} ${CPPFLAGS} ${DEFSG} $(TEST_D) -L. -lomalloc_d -o omtTest_d |
---|
[66502b8] | 363 | |
---|
[13fe1b] | 364 | TEST_G := $(TESTSOURCES:.c=.og) |
---|
[3df5b10] | 365 | omtTest_g: libg $(TEST_G) |
---|
| 366 | $(CCG) ${CFLAGSG} ${CPPFLAGS} ${DEFSG} $(TEST_G) -L. -lomalloc_g -o omtTest_g |
---|
[66502b8] | 367 | |
---|
[13fe1b] | 368 | TEST_P := $(TESTSOURCES:.c=.op) |
---|
[3df5b10] | 369 | omtTest_p: libp $(TEST_P) |
---|
| 370 | $(CCG) ${CFLAGSP} ${CPPFLAGS} ${DEFSP} $(TEST_P) -L. -lomalloc_p -o omtTest_p |
---|
[be7466] | 371 | |
---|
[13fe1b] | 372 | TEST_B := $(TESTSOURCES:.c=.ob) |
---|
[3df5b10] | 373 | omtTest_b: libb $(TEST_B) |
---|
| 374 | $(CCG) ${CFLAGSB} ${CPPFLAGS} ${DEFSB} $(TEST_B) -L. -lomalloc_b /usr/lib/bmon.o -o omtTest_b |
---|
[be7466] | 375 | |
---|
[13fe1b] | 376 | TEST_O := $(TESTSOURCES:.c=.o) |
---|
[3df5b10] | 377 | omtTest: lib $(TEST_O) |
---|
| 378 | $(CC) ${CFLAGS} ${CPPFLAGS} ${DEFS} $(TEST_O) -L. -lomalloc -o omtTest |
---|
[be7466] | 379 | |
---|
[3df5b10] | 380 | TEST_NDEBUG_O := $(TESTSOURCES:.c=.o_ndebug) |
---|
| 381 | omtTest_ndebug: libomalloc_ndebug.a $(TEST_NDEBUG_O) |
---|
| 382 | $(CC) ${CFLAGS} ${CPPFLAGS} ${DEFS} $(TEST_NDEBUG_O) -DOM_NDEBUG -L. -lomalloc_ndebug -o omtTest_ndebug |
---|
[66502b8] | 383 | |
---|
[3df5b10] | 384 | %.om : %.c omalloc.h |
---|
| 385 | $(CC) ${CFLAGS} ${CPPFLAGS} ${DEFS} -DOM_TEST_MALLOC -c $< -o $@ |
---|
| 386 | TEST_M := $(TESTSOURCES:.c=.om) |
---|
[13fe1b] | 387 | omtTest_m: lib $(TEST_M) |
---|
[3df5b10] | 388 | $(CC) ${CFLAGS} ${CPPFLAGS} ${DEFS} -DOM_TEST_MALLOC $(TEST_M) -L. -lomalloc -o omtTest_m |
---|
[66502b8] | 389 | |
---|
| 390 | ## |
---|
[3df5b10] | 391 | ## backup |
---|
[66502b8] | 392 | ## |
---|
| 393 | |
---|
[3df5b10] | 394 | backup: omalloc-$(VERSION).tgz |
---|
| 395 | mcopy -o omalloc-$(VERSION).tgz a: |
---|
[66502b8] | 396 | |
---|
| 397 | ## |
---|
[13fe1b] | 398 | ## Dependencies |
---|
| 399 | ## |
---|
[a90dc0] | 400 | %.d: %.c omConfig.h mylimits.h Makefile omTables.h omTables.inc omalloc.h omlimits.h |
---|
[3df5b10] | 401 | echo $(@:.d=.o_ndebug) $(@:.d=.og) $(@:.d=.od) $(@:.d=.op) $(@:.d=.ob) $(@:.d=_d.c) $(@:.d=.om)" " \\ > $@ |
---|
[66502b8] | 402 | $(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@ |
---|
| 403 | |
---|
[a90dc0] | 404 | depend: $(CSOURCES:.c=.d) omConfig.h omlimits.h mylimits.h $(TESTSOURCES:.c=.d) |
---|
[66502b8] | 405 | cat *.d >depend |
---|
| 406 | |
---|
| 407 | ifeq (depend,$(wildcard depend)) |
---|
| 408 | include depend |
---|
| 409 | endif |
---|
| 410 | |
---|
| 411 | |
---|
| 412 | |
---|