I'd prefer having some opinions/reviews (@jacobly in particular?) before committing something or making a PR about all this...
Taking this Makefile as reference:
- Line 28 For Mac compatibility (someone else should try...), and possibly Linux, I had to change it to:
WINPATH = $(subst \,\\,$(shell winepath --windows $(1))) otherwise ZDS thought paths with slashes were switches, and with backslashes ones, it was standard escapes. Neither are what we mean.
- Line 34 should be
RM = rm --force instead, for more compatibility
- Line 66:
$(realpath .) can be simply replaced by . (well, it works fine for me anyway)
- Lines 57, 59, 62, 67: I'm pretty sure the
NATIVEPATH should be WINPATH - at least on Mac I had to replace those
- Line 83: I guess
|| @$(RM) $(OBJECTS) $(TARGET).hex should not remove the objects. Probably only the .hex if you want to clean things up in case of failure
- Line 84-85: such lines shouldn't be in the Makefile at all? (Well, maybe in the
clean rule only, but they're there already)
- Line 102: deleting
$(TARGET).* is way too dangerous. If a source file has the same name as a target, for instance... $(TARGET).map $(TARGET).hex sounds a bit safer.
Also:
- I couldn't get it to work under Linux with an apparently standard wine setup, it gave me weird paths whatever I tried, which ZDS refused...
- ... but that's not so bad, because I can use ZDS's make.exe under wine, on which it then works fine (and only one call to wine is made, not several as it would apparently be from Linux/Mac)
- For some reason,
make -jX is now broken. When trying that (which would be greatly beneficial for multi-files projects), it errors on missing files (related to cstartup.obj, IIRC)
I'd prefer having some opinions/reviews (@jacobly in particular?) before committing something or making a PR about all this...
Taking this Makefile as reference:
WINPATH = $(subst \,\\,$(shell winepath --windows $(1)))otherwise ZDS thought paths with slashes were switches, and with backslashes ones, it was standard escapes. Neither are what we mean.RM = rm --forceinstead, for more compatibility$(realpath .)can be simply replaced by.(well, it works fine for me anyway)NATIVEPATHshould beWINPATH- at least on Mac I had to replace those|| @$(RM) $(OBJECTS) $(TARGET).hexshould not remove the objects. Probably only the.hexif you want to clean things up in case of failurecleanrule only, but they're there already)$(TARGET).*is way too dangerous. If a source file has the same name as a target, for instance...$(TARGET).map $(TARGET).hexsounds a bit safer.Also:
make -jXis now broken. When trying that (which would be greatly beneficial for multi-files projects), it errors on missing files (related tocstartup.obj, IIRC)