Great tips. I modified the makefile using your suggestions. Thank you.

On Thu, Jul 13, 2017 at 7:22 PM, Rugxulo <rugx...@gmail.com> wrote:

> Hi,
>
> On Wed, Jul 12, 2017 at 8:02 PM, Mark Olesen <markjole...@gmail.com>
> wrote:
> >
> > Just for fun, I created an LS binary for FreeDOS.
> >
> > It is hosted on github and can be found here:
> >
> > https://github.com/markjolesen/dosutil
>
> Cool stuff. Though I haven't actually run it yet (nor built atop DOS
> proper).
>
> Just a few tips:
>
> 1). You don't need a separate ls.lnk file at all, even under DOS.
>
> For DOS, you can use "CC = *wcc" (notice the asterisk, aka star) for
> working with "long" cmdlines. In this case, you would use "*wlink". (I
> haven't personally tested this particular fix in native DOS yet, but
> I've successfully done it for other projects.) See section 10.39 in
> tools.pdf.
>
> So the relevant makefile lines would now be:
>
> ls.exe : $(OBJS)
>         *wlink name ls.exe format dos debug all op map file $(OBJS: =,)
>
> (You linked objects in different order in ls.lnk, but when I adjusted
> the makefile to use the same order, the resultant binary was the exact
> same as yours, built here on Win7 64-bit. And yes, you need "format
> dos" else it seems to think it's a Win16 .EXE, ugh.).
>
> 2). The other obvious improvement is this:
>
> clean: .SYMBOLIC
>         @rm -f *.obj ls.exe *.map
>
> I take it that you didn't know that Wmake has its own "rm" built-in?
> So no need to use multiple "del"s here. (tools.pdf also mentions that
> Wmake intercepts "set" and "for".)
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to