1
##############################################################################
3
# Copyright (C) 2005 - 2009 by Vivante Corp.
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public Lisence as published by
7
# the Free Software Foundation; either version 2 of the license, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public Lisence for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not write to the Free Software
17
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
##############################################################################
24
# This file is a part of Vivante software stack build environment for Linux.
25
# It defines the rules necessary to build Linux kernel HAL driver. This file
26
# is included from within the system makefile; here we need to define what
27
# needs to be build for our driver.
31
################################################################################
32
# Set the kernel driver flag.
37
################################################################################
38
# Include common definitions.
40
include $(AQROOT)/GNUmakefile.common
43
################################################################################
44
# Define Vivante library directories.
46
ARCH_LIB_DIR = ../../../../arch/$(notdir $(AQARCH))/hal/kernel/$(OBJ_DIR)
47
ROOT_LIB_DIR = ../../../kernel/$(OBJ_DIR)
50
################################################################################
51
# Describe object files.
53
OBJECTS = ./Driver.o \
60
################################################################################
61
# Add extra flags for object files.
63
EXTRA_CFLAGS += -DLINUX -DDRIVER
66
EXTRA_CFLAGS += -DDBG=1 -DDEBUG -D_DEBUG
68
EXTRA_CFLAGS += -DDBG=0
71
EXTRA_CFLAGS += -I$(AQROOT)/hal/inc
72
EXTRA_CFLAGS += -I$(AQROOT)/hal/kernel
73
EXTRA_CFLAGS += -I$(AQARCH)/hal/kernel
74
EXTRA_CFLAGS += -I$(AQARCH)/cmodel/inc
77
################################################################################
78
# Define the target output.
80
obj-m = $(OBJ_DIR)/GALCore.o
82
$(OBJ_DIR)/GALCore-objs = $(OBJECTS)
83
$(OBJ_DIR)/GALCore-objs += $(ARCH_LIB_DIR)/libHALArchKernel.a
84
$(OBJ_DIR)/GALCore-objs += $(ROOT_LIB_DIR)/libHALKernel.a