Makefile prepends `-n obj/` to all DEPFILES, causing build failure
Hello,
First, I'm really excited to find a project reviving Urban Assault. It was one of my favourite games from childhood and I'm very happy to have the chance to play it again. Thank you.
I've run into a couple of build problems. This line here: https://github.com/Marisa-Chan/UA_source/blob/master/src/Makefile#L148
This will prepend -n obj/ to the head of all DEPFILES, which causes the build to fail with:
obj/yw_brif.d:1: *** missing separator. Stop.
This gets around it:
diff --git a/src/Makefile b/src/Makefile
index 55c75b7..893ddfb 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -145,7 +145,7 @@ $(CPPDEPFILES): $(OBJDIR)/%.d: %.cpp
$(DEPFILES):
mkdir -p $(@D)
- echo -n "$(OBJDIR)/" > $@
+ printf "$(OBJDIR)/" > $@
$(CXX) $(CFLAGS) $(CDEFS) -c $< -MM >> $@
-include $(DEPFILES)
But I still run into a lot of build errors (in next issue).
The reason for this is in the echo(1) man page:
the builtin echo in sh(1) does not accept the -n option.
Oh, thanks, I just forgot make commit and push it(https://github.com/Marisa-Chan/UA_source/commit/11e8e41e958e2aaab331b232fd5c02f0f19d562a)
Also did you resolve problems with shaders?
Sorry I struggle to make time to play video games! I had a (dumb) question related to that... so after following the game install instructions on the wiki, do I then continue to run the game under wine, or does UA_source allow running natively?
If it's successfully compiled with clang(c++) - it can run natively, without of wine.
пн, 10 янв. 2022 г., 13:47 Paul W. Rankin @.***>:
Sorry I struggle to make time to play video games! I had a (dumb) question related to that... so after following the game install instructions on the wiki, do I then continue to run the game under wine, or does UA_source allow running natively?
— Reply to this email directly, view it on GitHub https://github.com/Marisa-Chan/UA_source/issues/52#issuecomment-1008581857, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJLFIMIVCFVCJG24NZPEDUVJ6INANCNFSM5K375WHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>