The trick is to not try to build executables directly from .c files,
but to always build the intermediate .o files. For obscure reasons,
Darwin's version of gcc will leave debug cruft behind in the first
case but not the second. Per complaint from Robert Haas.
ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include
%: %.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
+ $(CC) $(CPPFLAGS) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
%.c: %.pgc ../regression.h
$(ECPG) -o $@ -I$(srcdir) $<