- @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && make install
+ @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+
+ # Apply patches
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.03-sysmacros.patch
+
+ # Build
+ cd $(DIR_APP) && make bios $(MAKETUNING)
+ifeq "$(BUILD_ARCH)" "x86_64"
+ cd $(DIR_APP) && make efi64 $(MAKETUNING)
+endif
+
+ # Install
+ cd $(DIR_APP) && make bios install
+ifeq "$(BUILD_ARCH)" "x86_64"
+ cd $(DIR_APP) && make efi64 install
+endif
+