寫了一個 Makefile 來編譯並安裝 SID Simulator 在 Mac OS 10.6
# # Build and Install SID # TAR_FILE = $(CURDIR)/sid-20110301.tar.bz2 BUILD_DIR = $(CURDIR)/SID_BUILD SRC_DIR = $(CURDIR)/SID_SRC INSTALL_DIR = $(CURDIR)/SID_INSTALL info: @echo "Current DIR is $(CURDIR)" @echo "make extract ; Extraction Compressed File" @echo "make config ; Build Makefile" @echo "make compile ; Compile Source Code" @echo "make installe ; Install SID" all: extract config compile install extract: $(SRC_DIR) (cd $(SRC_DIR); tar -jxvf $(TAR_FILE)) config: $(BUILD_DIR) $(INSTRALL_DIR) (cd $(BUILD_DIR); $(SRC_DIR)/src/configure --prefix=$(INSTALL_DIR) LDFLAGS=-L/usr/X11/lib) compile: $(BUILD_DIR) (cd $(BUILD_DIR); make) install: $(BUILD_DIR) $(INSTALL_DIR) (cd $(BUILD_DIR); make install) $(SRC_DIR): @echo [INFO] Create $@ mkdir $@ $(BUILD_DIR): @echo [INFO] Create $@ mkdir $@ $(INSTALL_DIR): @echo [INFO] Create $@ mkdir $@ clean: rm -rf $(SRC_DIR) rm -rf $(BUILD_DIR)