bradleyeckert / chad

A self-hosting Forth for J1-style CPUs
Other
24 stars 4 forks source link

Don't try to compile coproc.c - it's included from chad.c. #4

Closed uncle-betty closed 3 years ago

uncle-betty commented 3 years ago

Hey Brad,

Here's a proposal for excluding coproc.c from the build when using the makefile included with Chad.

The makefile build failed, because coproc.c uses definitions from stdint.h without including it. Which makes sense, given that coproc.c is supposed to be compiled via inclusion in chad.c, which takes care of including stdint.h.

I changed the makefile to only consider source code files whose names do not start with _, and I renamed coproc.c to _coproc.c.

I like how generic the makefile is and I thus didn't want to hard-code knowledge about coproc.c into the makefile. Instead, I tried to come up with a generic "ignore these source code files" mechanism.

Also, you seem to be observing a margin of 80 characters, so I observed that, too.

With this change, Chad now builds out of the box using the included makefile on Linux and Mac OS.