From: Thies C. Arntzen Date: Tue, 10 Aug 1999 09:16:19 +0000 (+0000) Subject: you can now override the CFLAGS while doing make - eg: X-Git-Tag: PRE_DELAYED_ARRAY_FETCH_PATCH~407 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63931ff4e84945cc4e6ac649fd4289b7aa5986a7;p=php you can now override the CFLAGS while doing make - eg: make CFLAGS="-g" --- diff --git a/Makefile.in b/Makefile.in index 1fadf472c7..63ec5055e3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -54,7 +54,8 @@ CFLAGS_SHLIB = @CFLAGS_SHLIB@ LDFLAGS_SHLIB = @LDFLAGS_SHLIB@ LDFLAGS_SHLIB_EXPORT = @LDFLAGS_SHLIB_EXPORT@ CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ $(CFLAGS_SHLIB) $(CPPFLAGS) $(INCLUDE) @DEBUG_CFLAGS@ @STRONGHOLD@ $(PROF_CFLAGS) +CFLAGS = @CFLAGS@ @DEBUG_CFLAGS@ $(PROF_CFLAGS) +COMPILE = $(CC) $(CFLAGS) $(CFLAGS_SHLIB) $(CPPFLAGS) $(INCLUDE) @STRONGHOLD@ LDFLAGS = @RPATHS@ @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT) -L$(ZEND_DIR) REGCFLAGS = $(CFLAGS) RANLIB = @RANLIB@ @@ -121,7 +122,7 @@ configuration-parser.h configuration-parser.c: $(srcdir)/configuration-parser.y bison -p cfg -v -d $(srcdir)/configuration-parser.y -o configuration-parser.c configuration-scanner.o: configuration-scanner.c - $(CC) $(CFLAGS) $(LEX_CFLAGS) -c configuration-scanner.c + $(COMPILE) $(LEX_CFLAGS) -c configuration-scanner.c configuration-scanner.c: $(srcdir)/configuration-scanner.l flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l @@ -222,10 +223,7 @@ indent: clean rm -f *~ .c.o: - @rm -f $@ - $(CC) $(CFLAGS) -c $< -o $@ -# @bn=`echo $@ | sed -e 's#functions/##'`; test -f $@ || \ -# (test "$@" != "$$bn" && test -f "$$bn" && mv $$bn $@) + $(COMPILE) -c $< parser-scanner: configuration-parser.c configuration-scanner.c diff --git a/ext/ereg/regex/Makefile.in b/ext/ereg/regex/Makefile.in index d715a08eae..4561974b06 100644 --- a/ext/ereg/regex/Makefile.in +++ b/ext/ereg/regex/Makefile.in @@ -12,7 +12,8 @@ RANLIB=@RANLIB@ # Put -Dconst= in for a pre-ANSI compiler. # Do not take -DPOSIX_MISTAKE out. # REGCFLAGS isn't important to you (it's for my use in some special contexts). -CFLAGS=-I$(srcdir) -I. -DPOSIX_MISTAKE @CFLAGS@ +CFLAGS=@CFLAGS@ +COMPILE=$(CC) $(CFLAGS) -I$(srcdir) -I. -DPOSIX_MISTAKE # If you have a pre-ANSI compiler, put -o into MKHFLAGS. If you want # the Berkeley __P macro, put -b in. @@ -41,6 +42,9 @@ JUNKLINT=possible pointer alignment|null effect .c.ih: sh $(srcdir)/mkh $(MKHFLAGS) -p $< >$@ +.c.o: + $(COMPILE) -c $< + all lib: libregex.a libregex.a: $(OBJPRODN) diff --git a/regex/Makefile.in b/regex/Makefile.in index d715a08eae..4561974b06 100644 --- a/regex/Makefile.in +++ b/regex/Makefile.in @@ -12,7 +12,8 @@ RANLIB=@RANLIB@ # Put -Dconst= in for a pre-ANSI compiler. # Do not take -DPOSIX_MISTAKE out. # REGCFLAGS isn't important to you (it's for my use in some special contexts). -CFLAGS=-I$(srcdir) -I. -DPOSIX_MISTAKE @CFLAGS@ +CFLAGS=@CFLAGS@ +COMPILE=$(CC) $(CFLAGS) -I$(srcdir) -I. -DPOSIX_MISTAKE # If you have a pre-ANSI compiler, put -o into MKHFLAGS. If you want # the Berkeley __P macro, put -b in. @@ -41,6 +42,9 @@ JUNKLINT=possible pointer alignment|null effect .c.ih: sh $(srcdir)/mkh $(MKHFLAGS) -p $< >$@ +.c.o: + $(COMPILE) -c $< + all lib: libregex.a libregex.a: $(OBJPRODN)