Makefiles are not for everyone, Xcode projects certainly power the bulk of development on a Mac these days. Xcode projects work well with Eddie, the xcodebuild command line tool is very much at home in a Worksheet. If you do use makefiles though, Eddie is here to help you.
The Worksets window allows you to auto-create or update a makefile. It includes lists of all the source files from your workset into the makefile. The lists are grouped into sublists, belonging to the individual groups. Depending on your build setup, you may use the $(SRCS) variable to build all your sources or the individual sublists if you are building separate library or archive files from the different source tree subdirectories. Note that in our resulting makefile there is also a list for $(NIBSOURCES) - .nib files.
If you have the makefile open in an Eddie window, the resulting text will be pasted directly into the window.
Eddie generates the following lists if the corresponding file types are included:
$(SRCS) | list of .cpp and .c files |
$(NIBSOURCES) | list of .nib files |
$(MISCSOURCES) | Other (.l, .y, etc.) |
Once the makefile is generated, you may make changes to it and later, after you have added more files to your workset, use Export makefile again. All your changes will be preserved - Eddie only edits the text in between the # @src->@ and # @<-src@ lines.
When you invoke the Export makefile command, Eddie looks into the parent directory of your workset to find a file named makefile or Makefile. If it finds one, it inserts the generated portion of the makefile inside the # @src->@ and # @<-src@ lines or appends it to the end. If there is no makefile yet, it will use a makefile template - ~/Library/Preferences/com.el34.eddie/MakefileTemplate. This file is generated the first time you use the Export makefile command. Once you have a template file in your settings folder, you may edit it any way you like.
Export Makefile As... lets you specify which makefile to export into.
You may want to not include some files in the resulting makefile - they may be in the workset just for reference (.h files, README files, makefiles, etc.). To do that, place them in a group that has the "Include in make" checkbox turned off. Anything in a group like that will be ignored when generating a makefile. In fact the only group that has the "Include in make checkbox" turned on by default is one created by dragging a folder into the workset window. You may turn this checkbox on and off in the Edit group name dialog.