# -*- makefile -*-
lib_LIBRARIES=boot_fn
-boot_fn_SOURCES = boot_fn.o
+boot_fn_SOURCES = boot_fn.c
#bin_PROGRAMS = boot
-boot_SOURCES = boot.c boot_fn.o
+boot_SOURCES = boot.c boot_fn.c
#link_VARIANTS = ram flash
lib_obj_SOURCES = crt0.S boot_fn.o
include_HEADERS = boot_fn.h
-
-default_CONFIG = CONFIG_PIC_BOOT_FN=y
-
-ifeq ($(CONFIG_PIC_BOOT_FN),y)
-# The following is for non-standard compilation of boot_fn
-define local_EVALUATE
-$(call COMPILE_c_o_template,$(SOURCES_DIR)/boot_fn.c,boot_fn.s1,-fpic -S)
-$(call COMPILE_S_o_template,boot_fn.s,boot_fn.o,-fpic -c)
-endef
-
-# This rule replaces jsr instructions by bsr ones which are relative
-# calls.
-boot_fn.s : boot_fn.s1
- @$(QUIET_CMD_ECHO) " SED $@"
- $(Q) sed 's/jsr[^0-9_A-Za-z]*@_\([0-9_A-Za-z]*\)\([^0-9_A-Za-z]*\)/bsr _\1:16\2/g' <$< >$@
-
-clean-custom:
- @rm boot_fn.s1 boot_fn.s
-else
-USER_SOURCES += boot_fn.c
-endif # CONFIG_PIC_BOOT_FN