davidjoffe / dave_gnukem

Dave Gnukem is a cross-platform 2D scrolling platform shooter inspired by Duke Nukem 1
GNU General Public License v2.0
75 stars 21 forks source link

Simpler and tidier Makefile for new debian dir #173

Closed matteobin closed 1 year ago

matteobin commented 1 year ago

This Makefile can be made even more portable, however David should decide if he prefers a portable Makefile or a convenient one that works just for the platforms he supports. A portable Makefile can be made at the expense of automating certain tasks, like finding all CPP files in the dir. In a portable Makefile you would have to edit the variables by hand, or comment some out.

davidjoffe commented 1 year ago

Thank you!!! Will look closer at all this when I can and decide about these Makefiles.

One quick comment this "ed_standalone_original.cpp" in fact probably shouldn't be in the code anymore (I think) ... in fact I didn't even notice it was still there until I did the Makefile wildcard thing today and suddenly got a compile error on it.

What happened was when I first made the Level Editor like ~20+ years ago or whatever I had made it a separate application - someone else later integrated it into the game itself (I am not even sure who) - so that file is effectively obsolete, except maybe for historical record and in case we ever want to see what the original leveleditor did.

I don't think I ever want to make it a separate application again, that would seem like a waste of time probably.

For now I made the "ed_standalone_original.cpp" just do nothing by adding a few lines at the top that effectively disable everythjing in it, while I decide what to do with it:

//dj2022-11 hm this file seemingly no longer used - in the early days the editor was a seperate application - someone else integrated it into the game itself
// so this file is here only now for historical or reference purposes but can probably be deleted
#define djED_STANDALONE_ORIGINAL_DISABLE
#ifndef djED_STANDALONE_ORIGINAL_DISABLE

So any Makefile can now in theory safely just also wildcard over it with no problem at least.

davidjoffe commented 1 year ago

Did some brief testing and overall looks good to me ... (maybe one or two small fixes I may want to add for Mac builds, plus one or two other small ... will look at ASAP!)