]> granicus.if.org Git - php/commitdiff
you can now override the CFLAGS while doing make - eg:
authorThies C. Arntzen <thies@php.net>
Tue, 10 Aug 1999 09:16:19 +0000 (09:16 +0000)
committerThies C. Arntzen <thies@php.net>
Tue, 10 Aug 1999 09:16:19 +0000 (09:16 +0000)
make CFLAGS="-g"

Makefile.in
ext/ereg/regex/Makefile.in
regex/Makefile.in

index 1fadf472c78be793fcea82e96c2c5a61e4895896..63ec5055e3b262426effeacc68aead8a1e3210e3 100644 (file)
@@ -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
 
index d715a08eaeea25a47ed85750046c919444393f52..4561974b06b035c3018042f22b9ed1093bcaf7a9 100644 (file)
@@ -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)
index d715a08eaeea25a47ed85750046c919444393f52..4561974b06b035c3018042f22b9ed1093bcaf7a9 100644 (file)
@@ -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)