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

BSD Makefile deletion #201

Closed matteobin closed 7 months ago

matteobin commented 7 months ago

Hi David, I tried to reach you by email, but you've never answered me. Have my emails been sent to your spam folder?

Here's your favourite GNU/Linux and Debian friend writing a Makefile suggestion for you. I wanted to synchronise the BSD Makefile with the new content of the main one, when I realised that they would differ for just ONE line. The following:

-OBJ = $(shell find src -iname '*.cpp' -type f | sed 's/\.cpp$$/.o/' | sort)
+OBJ != find src -iname '*.cpp' -type f | sed 's/\.cpp$$/.o/' | sort

As convenient as it is, I don't think that dynamically defining the OBJ variable is worth having two separate Makefiles. Besides, getting a list of all the source files is just a matter of running the same script that now populates the OBJ variable.