dd86k / ddcpuid

🔬 dd's x86 CPU Identification tool
MIT License
36 stars 1 forks source link

add a simple Makefile #25

Closed TypicalFence closed 4 years ago

TypicalFence commented 4 years ago

its a little silly

TypicalFence commented 4 years ago

added a debug target and a debugflags depending on the compiler used

TypicalFence commented 4 years ago

It now looks like gdc won't compile tho

fence@fence-desktop ~/c/d/ddcpuid> make release DC=gdc
make ddcpuid DFLAGS=" -O -frelease -fbounds-check=off"
make[1]: Entering directory '/home/fence/code/d/ddcpuid'
gdc -O -frelease -fbounds-check=off ddcpuid.d
* sizeof CPUINFO: 224LU
* sizeof CACHE: 16LU
ddcpuid.d: Assembler messages:
ddcpuid.d:1014: Error: bad register name `%eaxmov %ebx'
make[1]: *** [Makefile:45: ddcpuid] Error 1
make[1]: Leaving directory '/home/fence/code/d/ddcpuid'
make: *** [Makefile:30: release] Error 2

dmd and ldc work fine.

if you wanna be fancy you could add some CI thing that builds it with all compilers :3

dd86k commented 4 years ago

Heh I haven't updated the inline GAS assembly in a while. It's a total mess, I think it was working before GDC 8.4.0. I'll have to fix that up eventually.

The rest looks good.