mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
When creating kernel dependencies, need to define __KERNEL__
This commit is contained in:
+13
-1
@@ -35,6 +35,18 @@
|
|||||||
|
|
||||||
-include $(TOPDIR)/Make.defs
|
-include $(TOPDIR)/Make.defs
|
||||||
|
|
||||||
|
# CFLAGS
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
|
||||||
|
else
|
||||||
|
KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Sources and paths
|
||||||
|
|
||||||
ASRCS =
|
ASRCS =
|
||||||
CSRCS =
|
CSRCS =
|
||||||
|
|
||||||
@@ -107,7 +119,7 @@ endif
|
|||||||
.depend: Makefile $(SRCS)
|
.depend: Makefile $(SRCS)
|
||||||
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
||||||
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
|
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
|
||||||
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_kbin.dep
|
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >Make_kbin.dep
|
||||||
else
|
else
|
||||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
||||||
endif
|
endif
|
||||||
|
|||||||
+11
-1
@@ -35,6 +35,16 @@
|
|||||||
|
|
||||||
-include $(TOPDIR)/Make.defs
|
-include $(TOPDIR)/Make.defs
|
||||||
|
|
||||||
|
# CFLAGS
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
|
||||||
|
else
|
||||||
|
KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Core allocator logic
|
# Core allocator logic
|
||||||
|
|
||||||
ASRCS =
|
ASRCS =
|
||||||
@@ -102,7 +112,7 @@ endif
|
|||||||
.depend: Makefile $(SRCS)
|
.depend: Makefile $(SRCS)
|
||||||
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
||||||
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
|
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
|
||||||
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_kbin.dep
|
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >Make_kbin.dep
|
||||||
else
|
else
|
||||||
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user