Remove preprocessor info from generated files so that you can use GDB

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1414 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-12-04 23:01:43 +00:00
parent 6d88b5b00c
commit 6956b4543e
2 changed files with 24 additions and 7 deletions

View File

@ -64,6 +64,8 @@ endif
CPPFLAGS += -DNXFONTS_BITSPERPIXEL=$(NXFONTS_BITSPERPIXEL) CPPFLAGS += -DNXFONTS_BITSPERPIXEL=$(NXFONTS_BITSPERPIXEL)
CPPFLAGS += -DNXFONTS_SUFFIX=$(NXFONTS_SUFFIX) CPPFLAGS += -DNXFONTS_SUFFIX=$(NXFONTS_SUFFIX)
CONV_TMP = $(CONV_CSRC:.c=.i)
GEN_CSRCS = $(CONV_CSRC) GEN_CSRCS = $(CONV_CSRC)
all: $(GEN_CSRCS) all: $(GEN_CSRCS)
@ -71,11 +73,13 @@ all: $(GEN_CSRCS)
$(CONV_CSRC) : nxfonts_convert.c $(CONV_CSRC) : nxfonts_convert.c
ifneq ($(NXFONTS_BITSPERPIXEL),) ifneq ($(NXFONTS_BITSPERPIXEL),)
$(call PREPROCESS, nxfonts_convert.c, $@) @$(call PREPROCESS, $<, $(CONV_TMP))
@cat $(CONV_TMP) | sed -e "/^#/d" >$@
@rm -f $(CONV_TMP)
endif endif
clean: clean:
@rm -f *~ .*.swp @rm -f *~ .*.swp *.i
distclean: clean distclean: clean
@rm -f nxfonts_convert_*bpp.c @rm -f nxfonts_convert_*bpp.c

View File

@ -89,6 +89,11 @@ endif
CPPFLAGS += -DNXGLIB_BITSPERPIXEL=$(NXGLIB_BITSPERPIXEL) CPPFLAGS += -DNXGLIB_BITSPERPIXEL=$(NXGLIB_BITSPERPIXEL)
CPPFLAGS += -DNXGLIB_SUFFIX=$(NXGLIB_SUFFIX) CPPFLAGS += -DNXGLIB_SUFFIX=$(NXGLIB_SUFFIX)
RFILL_TMP = $(RFILL_CSRC:.c=.i)
TFILL_TMP = $(TFILL_CSRC:.c=.i)
RMOVE_TMP = $(RMOVE_CSRC:.c=.i)
RCOPY_TMP = $(RCOPY_CSRC:.c=.i)
GEN_CSRCS = $(RFILL_CSRC) $(TFILL_CSRC) $(RMOVE_CSRC) $(RCOPY_CSRC) GEN_CSRCS = $(RFILL_CSRC) $(TFILL_CSRC) $(RMOVE_CSRC) $(RCOPY_CSRC)
all: $(GEN_CSRCS) all: $(GEN_CSRCS)
@ -96,26 +101,34 @@ all: $(GEN_CSRCS)
$(RFILL_CSRC) : nxglib_fillrectangle.c nxglib_bitblit.h $(RFILL_CSRC) : nxglib_fillrectangle.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
$(call PREPROCESS, nxglib_fillrectangle.c, $@) @$(call PREPROCESS, nxglib_fillrectangle.c, $(RFILL_TMP))
@cat $(RFILL_TMP) | sed -e "/^#/d" >$@
@rm -f $(RFILL_TMP)
endif endif
$(TFILL_CSRC) : nxglib_filltrapezoid.c nxglib_bitblit.h $(TFILL_CSRC) : nxglib_filltrapezoid.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
$(call PREPROCESS, nxglib_filltrapezoid.c, $@) @$(call PREPROCESS, nxglib_filltrapezoid.c, $(TFILL_TMP))
@cat $(TFILL_TMP) | sed -e "/^#/d" >$@
@rm -f $(TFILL_TMP)
endif endif
$(RMOVE_CSRC) : nxglib_moverectangle.c nxglib_bitblit.h $(RMOVE_CSRC) : nxglib_moverectangle.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
$(call PREPROCESS, nxglib_moverectangle.c, $@) @$(call PREPROCESS, nxglib_moverectangle.c, $(RMOVE_TMP))
@cat $(RMOVE_TMP) | sed -e "/^#/d" >$@
@rm -f $(RMOVE_TMP)
endif endif
$(RCOPY_CSRC) : nxglib_copyrectangle.c nxglib_bitblit.h $(RCOPY_CSRC) : nxglib_copyrectangle.c nxglib_bitblit.h
ifneq ($(NXGLIB_BITSPERPIXEL),) ifneq ($(NXGLIB_BITSPERPIXEL),)
$(call PREPROCESS, nxglib_copyrectangle.c, $@) @$(call PREPROCESS, nxglib_copyrectangle.c, $(RCOPY_TMP))
@cat $(RCOPY_TMP) | sed -e "/^#/d" >$@
@rm -f $(RCOPY_TMP)
endif endif
clean: clean:
@rm -f *~ .*.swp @rm -f *~ .*.swp *.i
distclean: clean distclean: clean
@rm -f nxglib_fillrectangle_*bpp.c nxglib_filltrapezoid_*bpp.c @rm -f nxglib_fillrectangle_*bpp.c nxglib_filltrapezoid_*bpp.c