Specifying an Inline File in NMAKE Makefile - Example needed - Programmer

This is a discussion on Specifying an Inline File in NMAKE Makefile - Example needed - Programmer ; Hi, I need an example of an Nmake Makefile with the "inline file" usage. The on-line MSDN "inline" documentation in insufficient, unclear and does not contain any working examples. ( http://msdn.microsoft.com/library/de..._Reference.asp ) Anyway, I need to do the same code ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Specifying an Inline File in NMAKE Makefile - Example needed

  1. Specifying an Inline File in NMAKE Makefile - Example needed

    Hi,
    I need an example of an Nmake Makefile with the "inline file" usage.
    The on-line MSDN "inline" documentation in insufficient, unclear and
    does not contain any working examples.
    (http://msdn.microsoft.com/library/de..._Reference.asp)

    Anyway, I need to do the same code for about 20 times in my Makefile
    (about 20 different rules).
    Does anybody have a WORKING example of it ?
    Please add a reply to this message.

    Additional info:
    I have a Windows 2000 SP4 OS. MSVC 6.0 is my development environment.
    I'm using the Texas Instrument Code Composer as an external compiler
    to Microsoft tools.
    My Makefile code looks currently like this (and I need to shorten it
    elegantly ...):

    {$(PATCHES_DIR)}.c{$(OBJ_DIR)}.obj:
    @echo $(**F) ...
    !ifdef Lint
    @echo $(SEPARATOR_LINE) >> $(MAKE_LOGFILE)
    @echo $(LINT) $(LINTFLAGS_ONE) $< -oo($(LOB_DIR)\$(**B).lob) >>
    $(MAKE_LOGFILE)
    $(LINT) $(LINTFLAGS_ONE) $< -oo($(LOB_DIR)\$(**B).lob)
    !endif # of Lint
    @echo $(SEPARATOR_LINE) >> $(MAKE_LOGFILE)
    @echo $(CC) $(CFLAGS) $< >> $(MAKE_LOGFILE)
    @$(CC) $(CFLAGS) $<

    {$(AS_DIR)}.c{$(OBJ_DIR)}.obj:
    @echo $(**F) ...
    !ifdef Lint
    @echo $(SEPARATOR_LINE) >> $(MAKE_LOGFILE)
    @echo $(LINT) $(LINTFLAGS_ONE) $< -oo($(LOB_DIR)\$(**B).lob) >>
    $(MAKE_LOGFILE)
    $(LINT) $(LINTFLAGS_ONE) $< -oo($(LOB_DIR)\$(**B).lob)
    !endif # of Lint
    @echo $(SEPARATOR_LINE) >> $(MAKE_LOGFILE)
    @echo $(CC) $(CFLAGS) $< >> $(MAKE_LOGFILE)
    @$(CC) $(CFLAGS) $<

    {$(HCIC_DIR)}.c{$(OBJ_DIR)}.obj:
    @echo $(**F) ...
    !ifdef Lint
    @echo $(SEPARATOR_LINE) >> $(MAKE_LOGFILE)
    @echo $(LINT) $(LINTFLAGS_ONE) $< -oo($(LOB_DIR)\$(**B).lob) >>
    $(MAKE_LOGFILE)
    $(LINT) $(LINTFLAGS_ONE) $< -oo($(LOB_DIR)\$(**B).lob)
    !endif # of Lint
    @echo $(SEPARATOR_LINE) >> $(MAKE_LOGFILE)
    @echo $(CC) $(CFLAGS) $< >> $(MAKE_LOGFILE)
    @$(CC) $(CFLAGS) $<

    Any help would be appreciated.
    Please CC your replies to gsavion_at_yahoo.com (replace the _at_ with
    @ - to avoid spam).

    Thanks,
    Gal Savion.

  2. Re: Specifying an Inline File in NMAKE Makefile - Example needed

    "Gal Savion" wrote:

    > I need an example of an Nmake Makefile with the "inline file" usage.
    > The on-line MSDN "inline" documentation in insufficient, unclear and
    > does not contain any working examples.
    > (http://msdn.microsoft.com/library/de..._Reference.asp)


    Use something like this:

    your-prog.exe: $(OBJS)
    $(LINK) @<<
    /out:$@ $(LDFLAGS) $(OBJS) $(LIBS)
    <<

    You can also add 'KEEP' to the '<<' to look at the inline file
    created in your $TEMP folder.

    But you'll be smarter to use GNU make instead. Since it's lot
    more powerful and bug free.

    Tommy.

+ Reply to Thread