OBJ_EXT = .obj
LIB_EXT = .lib
LIB_PREF =
+ASM_EXT = .asm
+AR = lib51
+AS = a51intel
+HC = oh51
+LI = l51
+
+c_o_COMPILE = $$(CC) $$(DEFS) $$(AM_CPPFLAGS)
+
+cc_o_COMPILE = $$(CXX) $$(DEFS) $$(DEFAULT_INCLUDES) $$(AM_CPPFLAGS) \
+ $$(CPPFLAGS) $$(AM_CXXFLAGS) $$(CFLAGS) $$(INCLUDES) -DOMK_FOR_USER
+
+# lib_obj_SOURCES handling
+$$(LIB_DIR)/%.o: %.o
+ @cp $$$$(CP_FLAGS) $$$$< $$$$@
+
+endef # COMPILER_DEFS_template
+
+# Syntax: $(call COMPILE_c_o_template,<source>,<target>,<additional c-flags>)
+define COMPILE_c_o_template
+$(2): $(1) $$(GEN_HEADERS)
+ @$(QUIET_CMD_ECHO) " CC $$@"
+ $(Q) cp $$< .;\
+ export C51INC=`echo "$$(DEFAULT_INCLUDES)" | sed -e 's/-I//' -e 's/-I/;/g' -e 's/ //g'`;\
+ $$(c_o_COMPILE) $(3) `basename $$< ` SRC ; \
+ if [ $$$$? -le 1 ] ; \
+ then if a51 `basename $$< .c`.src ; \
+ then \
+ touch "$$@.d" ; \
+ else echo ERRORLEVEL $$$$? ; exit 1; \
+ fi \
+ else echo ERRORLEVEL $$$$? ; exit 1; \
+ fi
+endef
+
+
+# Syntax: $(call COMPILE_cc_o_template,<source>,<target>,<additional c-flags>)
+define COMPILE_cc_o_template
+$(2): $(1) $$(GEN_HEADERS)
+ @$(QUIET_CMD_ECHO) " CXX $$@"
+ $(Q) echo "C++ compilation not suported for this compiler"
+endef
+
+# Syntax: $(call COMPILE_S_o_template,<source>,<target>,<additional c-flags>)
+define COMPILE_S_o_template
+$(2): $(1) $$(GEN_HEADERS)
+ @$(QUIET_CMD_ECHO) " ASM $$@"
+ $(Q) \
+ cp $$< .; \
+ if [ -f $(SOURCES_DIR)/reg1210.inc ] ; then \
+ cp $(SOURCES_DIR)/reg1210.inc .; \
+ fi;\
+ $$(AS) $(2:%$(OBJ_EXT)=%.asm
AR = lib51
AS = a51intel
HC = oh51
# Syntax: $(call COMPILE_c_o_template,<source>,<target>,<additional c-flags>)
define COMPILE_c_o_template
-$(2): $(1) $(LOCAL_CONFIG_H) $$(GEN_HEADERS)
+$(2): $(1) $$(GEN_HEADERS)
@$(QUIET_CMD_ECHO) " CC $$@"
$(Q) cp $$< .;\
export C51INC=`echo "$$(DEFAULT_INCLUDES)" | sed -e 's/-I//' -e 's/-I/;/g' -e 's/ //g'`;\
# Syntax: $(call COMPILE_cc_o_template,<source>,<target>,<additional c-flags>)
define COMPILE_cc_o_template
-$(2): $(1) $(LOCAL_CONFIG_H)
+$(2): $(1) $$(GEN_HEADERS)
@$(QUIET_CMD_ECHO) " CXX $$@"
$(Q) echo "C++ compilation not suported for this compiler"
endef
# Syntax: $(call COMPILE_S_o_template,<source>,<target>,<additional c-flags>)
define COMPILE_S_o_template
-$(2): $(1) $(LOCAL_CONFIG_H)
+$(2): $(1) $$(GEN_HEADERS)
@$(QUIET_CMD_ECHO) " ASM $$@"
$(Q) \
cp $$< .; \