~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
 INCL    += $(addprefix -I$(KBUILD_EXTMOD)/vboxnetadp,/ /include /r0drv/linux)
160
160
 export INCL
161
161
endif
162
 
KFLAGS   := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING
 
162
KFLAGS   := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
 
163
            -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING
163
164
ifdef VBOX_REDHAT_KABI
164
165
 KFLAGS  += -DVBOX_REDHAT_KABI
165
166
endif
173
174
ifeq ($(BUILD_TYPE),debug)
174
175
 KFLAGS  += -DDEBUG -DDEBUG_$(USER) -g
175
176
 # IPRT_DEBUG_SEMS indicates thread wrt sems state via the comm field.
176
 
 KFLAGS  += -DIPRT_DEBUG_SEMS
 
177
 #KFLAGS  += -DIPRT_DEBUG_SEMS
177
178
endif
178
179
 
179
180
# By default we use remap_pfn_range() kernel API to make kernel pages
180
 
# visible for userland. Unfortuately, it leads to situation that
 
181
# visible for userland. Unfortunately, it leads to situation that
181
182
# during debug session all structures on that page (such as PVM pointer)
182
183
# are not accessible to the debugger (see #3214).
183
184
# This code enables experimental support
199
200
obj-m += $(MODULE).o
200
201
 
201
202
$(MODULE):
202
 
        $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C $(KERN_DIR) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) modules
 
203
        $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -C $(KERN_DIR) modules
203
204
 
204
205
install: $(MODULE)
205
206
        @mkdir -p $(MODULE_DIR); \
211
212
        @mkdir -p $(MODULE_DIR); \
212
213
        install -m 0664 $(MODULE).$(MODULE_EXT) $(MODULE_DIR)
213
214
 
 
215
else # eq ($(MAKECMDGOALS),clean)
 
216
 
 
217
 ifndef KERN_DIR
 
218
  KERN_DIR := /lib/modules/$(shell uname -r)/build
 
219
  ifeq ($(wildcard $(KERN_DIR)/Makefile),)
 
220
   KERN_DIR := /usr/src/linux
 
221
  endif
 
222
 endif
 
223
 ifeq ($(wildcard $(KERN_DIR)/Makefile),)
 
224
 
 
225
clean:
 
226
        find . \( -name \*.o -o -name \*.cmd \) -print0 | xargs -0 rm -f
 
227
        rm -rf .tmp_ver* $(MODULE).* Module.symvers Modules.symvers modules.order
 
228
 
 
229
 else
 
230
 
 
231
clean:
 
232
        $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -C $(KERN_DIR) clean
 
233
 
 
234
 endif
 
235
 
214
236
endif # eq($(MAKECMDGOALS),clean)
215
 
 
216
 
# important: Don't remove Module.symvers! DKMS does 'make clean' before building ...
217
 
clean:
218
 
        for f in . linux r0drv r0drv/linux VBox common/err common/string common/log generic math/gcc; \
219
 
            do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done
220
 
        rm -rf .vboxnetadp* .tmp_ver* vboxnetadp.* Modules.symvers modules.order