working Makefile
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 23 Oct 2010 19:45:41 +0000 (22:45 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 23 Oct 2010 19:45:41 +0000 (22:45 +0300)
sta_dk/pform/linux/build/Makefile

index 9395e42..ee32f2f 100644 (file)
@@ -32,17 +32,28 @@ DK_ROOT = ../../..
 ifneq ($(KERNELRELEASE),)
     include $(M)/$(DK_ROOT)/pform/linux/build/common.inc
     include $(M)/$(DK_ROOT)/pform/linux/build/os_sources.inc
+    include $(M)/$(DK_ROOT)/common/build/linux/drv_sources.inc
 else
     include $(DK_ROOT)/pform/linux/build/common.inc
     include $(DK_ROOT)/pform/linux/build/os_sources.inc
+    include $(DK_ROOT)/common/build/linux/drv_sources.inc
 endif
 
 
+#
+# List of platform independent OS files needed to be compiled
+#
+OS_SRCS = \
+    $(DK_ROOT)/pform/common/src/osCmd.c \
+    $(DK_ROOT)/pform/common/src/osUtil.c \
+    $(DK_ROOT)/pform/common/src/osClsfr.c \
+    $(DK_ROOT)/pform/common/src/osRgstry.c
+
 #
 # List of linux OS files needed to be compiled
 #
 #    $(DK_ROOT)/pform/linux/src/iw_ioctl.c 
-OS_SRCS = \
+OS_SRCS += \
     $(DK_ROOT)/pform/linux/src/esta_drv.c \
     $(DK_ROOT)/pform/linux/src/osapi.c \
     $(DK_ROOT)/pform/linux/src/osmemapi.c \
@@ -152,7 +163,7 @@ ifneq ($(KERNELRELEASE),)
        #
        # Adds the current directory as a prefix to all include directories.
        #
-       EXTRA_CFLAGS += $(addprefix -I$(M)/, $(OS_INCS))
+       EXTRA_CFLAGS += $(addprefix -I$(M)/, $(OS_INCS) $(DK_INCS))
 
        #
        # Intermediate object name - this should be renamed to the desired object name
@@ -163,7 +174,7 @@ ifneq ($(KERNELRELEASE),)
        #
        # List of object files the kernel makefile needs to compile.
        #
-       linux-y = $(OS_OBJS) $(OS_AUXILIARY_LIBS)
+       linux-y = $(OS_OBJS) $(OS_AUXILIARY_LIBS) $(DK_OBJS)
 
 
 else   # ifneq ($(KERNELRELEASE),)
@@ -202,7 +213,7 @@ help:
 .PHONY: clean
 clean:
        $(MAKE) -C $(KERNEL_DIR) M=`pwd` ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) clean
-       @rm -f *.o *.a *~ *.~* core .depend dep $(OS_OBJS) $(FW_SRCS) $(FW_OBJS)
+       @rm -f *.o *.a *~ *.~* core .depend dep $(OS_OBJS) $(DK_OBJS) $(FW_SRCS) $(FW_OBJS)
 
 
 #