flamewing / asl-releases

Improved/bugfixed version of Alfred Arnold's The Macro Assembler AS
http://john.ccac.rwth-aachen.de:8000/as/
GNU General Public License v2.0
20 stars 2 forks source link

Add disabling support for CPU in (c)make file #29

Open kuroya2mouse opened 4 months ago

kuroya2mouse commented 4 months ago

I think many people only need support for the m68k and z80. How about adding an option to enable/disable arch. support? Like a -DM68K=on -DZ80=on -D_processor_name_which I don't need=off

flamewing commented 4 months ago

That is a good idea. I am not sure on how to go about this, though: I want to build all processors by default, so that the instructions on the readme give the most versatile version. But I also don't want to force someone to manually disable all CPUs except one or two for the case you mention.

So maybe have a flag along the lines of -DCUSTOMIZE_CPU_SELECTION that disables all CPUs, then have specific files for each CPU/code file?

kuroya2mouse commented 4 months ago

So maybe have a flag along the lines of -DCUSTOMIZE_CPU_SELECTION that disables all CPUs, then have specific files for each CPU/code file?

I think this is a good solution.

flamewing commented 3 months ago

I have been looking over, and this seems like AS is not meant for this to be done. I will need dozens of #ifdefs (basically, one for each code*.c file) to disable (or rather, not enable) the processors not selected, in addition to not compiling the files in question. That will take some work...