ccl
ccl copied to clipboard
Xcode project to build lisp kernel
It might be worthwhile to make an Xcode project for the lisp kernel. This would provide easier access to the static analyzer.
This would be in addition to (i.e., it would not replace) the current makefile-based build.
This may require some minor restructuring. I'm thinking in particular of the platform-specific include file (e.g., platform-darwinx8664.h) that's included via the -include option to the C compiler driver program.
Issue #59 (build lisp kernel with MS tools) might have a similar requirement.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I have spent some time messing around with this a couple of times now.
I keep getting stuck on figuring out how to make the Xcode equivalent of the following makefile rule:
.s.o:
$(M4) $(M4FLAGS) -I../ $< | $(AS) $(ASFLAGS) -o $@
I assume that I want to make a custom build rule for this, but to date I've had a hard time figuring out how to do that.
Another variant might be to rename the .s files to .sm4 files, and add some build rule to process the .sm4 files with m4 and produce .s files for Xcode to compile. I haven't been able to figure out how to make that work, either.
Renaming the .s files to .sm4 and using a rule to transform them would probably be best all around; Xcode and other environments will generally assume a .s file is directly usable assembly, not something to be run through a custom preprocessor.
An Xcode build rule that matches *.sm4 and generates $(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).s should be straightforward; the output should automatically be assembled, given that Xcode knows what to do with a .s file.