head	1.4;
access;
symbols
	vmware-netbsd-3-2-1-8:1.4
	vmware-netbsd-3-2-1-7:1.4
	vmware-netbsd-3-2-1-6:1.4
	vmware-netbsd-3-2-1-5:1.4
	vmware-netbsd-3-2-1-4:1.4
	vmware-netbsd-3-2-1-3:1.4
	vmware-netbsd-3-2-1-2:1.4
	vmware-netbsd-3-2-1-1:1.4
	vmware-3-2-1-2237:1.1.1.3
	vmware-netbsd-3-2-2:1.4
	vmware-netbsd-3-2-1:1.4
	vmware-netbsd-3-2-0:1.4
	vmware-3-2-0-2230:1.1.1.3
	vmware-netbsd-1-2:1.3
	vmware-2-0-4-1142:1.1.1.2
	vmware-netbsd-1-1:1.2
	vmware-netbsd-1-0:1.2
	vmware-2-0-2-621:1.1.1.1
	VMWARE:1.1.1;
locks; strict;
comment	@# @;


1.4
date	2003.02.16.15.32.33;	author bad;	state Exp;
branches;
next	1.3;

1.3
date	2003.02.16.10.09.56;	author bad;	state Exp;
branches;
next	1.2;

1.2
date	2003.02.16.01.29.49;	author bad;	state Exp;
branches;
next	1.1;

1.1
date	2003.02.16.01.20.26;	author bad;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2003.02.16.01.20.26;	author bad;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2003.02.16.09.51.09;	author bad;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2003.02.16.14.31.10;	author bad;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Resolve conflicts.
@
text
@#!/usr/bin/make -f
#############################################################
# Copyright (C) 1998-2002 VMware, Inc.
# All Rights Reserved
# $Id: Makefile.linux,v 1.1.1.3 2003/02/16 14:31:10 bad Exp $
#############################################################
####
####  VMware vmmon Makefile to be distributed externally
####

####
####  If you have an SMP kernel, you _must_ uncomment the line below.  If
#### you don't, and you're lucky, the driver won't compile.  Otherwise
#### it'll compile but just be potentially rather broken.
####
#SUPPORT_SMP=1

# Header directory for the running kernel
HEADER_DIR = /usr/src/linux/include

# Grep program
GREP = /bin/grep

####
#### TOPDIR _must_ be a relative path.
####
TOPDIR = .

####
####  DESTDIR is where the module, object files, and dependencies are built
####
DESTDIR = driver-`uname -r`

####
####  DRIVERNAME should be untouched unless you have a good reason to change 
#### it.  The form below is how the scripts expect it.
####
ifdef SUPPORT_SMP
DRIVERNAME = vmmon-smp-`uname -r`
else
DRIVERNAME = vmmon-up-`uname -r`
endif

ifdef QUIET
ECHO = @@true
else
ECHO = @@echo
endif

COMPILER_VERSION := $(shell $(CC) --version)
IS_GCC_30 := $(shell if echo $(COMPILER_VERSION) | $(GREP) -q '^3\.0'; then echo yes; else echo no; fi)

####
#### You must compile with at least -O level of optimization
#### or the module won't load.
#### If desparate, I think that bringing in <linux/bitops.h> might
#### suffice.
####
CC_WARNINGS = -Wall -Wstrict-prototypes 
# Don't use -pipe or egcs-2.91.66 (shipped with RedHat) will die
CC_KFLAGS = -D__KERNEL__ -fno-strength-reduce -malign-loops=2 \
            -malign-jumps=2 -malign-functions=2 -fno-omit-frame-pointer \
	    -DCPU=586
# Gcc 3.0 deprecates -m486 --hpreg
ifeq ($(IS_GCC_30),yes)
CC_KFLAGS += -march=i586
else
CC_KFLAGS += -m486
endif
CC_OPTS = -O2 -DMODULE $(GLOBAL_DEFS) $(CC_KFLAGS) $(CC_WARNINGS) 

ifdef SUPPORT_SMP
CC_OPTS += -DSUPPORT_SMP
endif

ifeq ($(shell $(GREP) 'FIX_IO_APIC_BASE_0' $(HEADER_DIR)/asm/fixmap.h 2>/dev/null),)
CC_OPTS += -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE
else
CC_OPTS += -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE_0
endif

INCLUDE = -I$(TOPDIR)/include -I$(TOPDIR)/common -I$(TOPDIR)/linux -I$(TOPDIR)/export/include -I$(HEADER_DIR)

C_TARGETS_LINUX  = driver.o hostif.o
C_TARGETS_COMMON = vmx86.o task.o memtrack.o phystrack.o cpuid.o
C_TARGETS_LINUX_D = ${C_TARGETS_LINUX:.o=.d}
C_TARGETS_COMMON_D = ${C_TARGETS_COMMON:.o=.d}
C_TARGETS =  $(C_TARGETS_LINUX) $(C_TARGETS_COMMON)

####
#### Make Targets are beneath here.
####

driver: setup deps
	$(MAKE) -C $(DESTDIR) -f ../Makefile TOPDIR=../$(TOPDIR) vmmon INCLUDE_DEPS=1

setup:
	@@if [ -d $(DESTDIR) ] ; then true ; else mkdir $(DESTDIR); chmod 755 $(DESTDIR) ; fi

vmmon: $(C_TARGETS)
	$(ECHO) "Building $(DRIVERNAME)"   
	ld -r -o $(DRIVERNAME) $(C_TARGETS)

auto-build: 
	$(MAKE) driver QUIET=1
	cp -f $(DESTDIR)/$(DRIVERNAME) $(TOPDIR)/../vmmon.o

$(C_TARGETS_LINUX): %.o: $(TOPDIR)/linux/%.c
	$(ECHO) "Compiling  linux/$(<F)"
	$(CC) $(CC_OPTS) $(INCLUDE) -c $<

$(C_TARGETS_COMMON): %.o: $(TOPDIR)/common/%.c
	$(ECHO) "Compiling  common/$(<F)"
	$(CC) $(CC_OPTS) $(INCLUDE) -c $<

clean:
	rm -rf $(DESTDIR)/

$(C_TARGETS_COMMON_D): %.d: $(TOPDIR)/common/%.c
	$(ECHO) "Dependencies for $(<F)"
	$(CC) -MM $(CC_OPTS) $(INCLUDE) $< > $@@

$(C_TARGETS_LINUX_D): %.d: $(TOPDIR)/linux/%.c
	$(ECHO) "Dependencies for $(<F)"
	$(CC) -MM $(CC_OPTS) $(INCLUDE) $< > $@@

deps: setup 
	$(MAKE) -C $(DESTDIR) -f ../Makefile TOPDIR=../$(TOPDIR) driver_deps 

driver_deps: ${C_TARGETS:.o=.d}

ifdef INCLUDE_DEPS
include ${C_TARGETS:.o=.d}
endif

.SILENT:
@


1.3
log
@resolv conflicts
@
text
@d1 1
d3 1
a3 1
# Copyright (C) 1998-2000 VMware, Inc.
d5 1
a5 1
# $Id: Makefile.linux,v 1.1.1.2 2003/02/16 09:51:09 bad Exp $
d8 1
a8 1
####  VMWare vmmon Makefile to be distributed externally
d21 3
a43 2
CC = gcc

d50 3
d61 1
a61 1
CC_KFLAGS = -D__KERNEL__ -fno-strength-reduce -m486 -malign-loops=2 \
d64 6
d76 1
a76 1
ifeq ($(shell grep 'FIX_IO_APIC_BASE_0' $(HEADER_DIR)/asm/fixmap.h 2>/dev/null),)
d85 1
a85 1
C_TARGETS_COMMON = vmx86.o task.o memtrack.o phystrack.o 
@


1.2
log
@Import (add) Frank van der Linden's port of the vmware modules to NetBSD.
@
text
@d4 1
a4 1
# $Id: Makefile.dist,v 1.2 2000/01/15 01:02:40 chuckr Exp $
d55 2
a56 1
CC_KFLAGS = -D__KERNEL__ -fno-strength-reduce -pipe -m486 -malign-loops=2 \
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import of the vmmon sources from vmware-2.0.2-621.tgz.
@
text
@@


1.1.1.2
log
@Import of the vmmon sources from vmware-2.0.4-1142.tgz.
@
text
@d4 1
a4 1
# $Id: Makefile.dist,v 1.2.2.1 2000/10/02 00:03:42 hpreg Exp $
d55 1
a55 2
# Don't use -pipe or egcs-2.91.66 (shipped with RedHat) will die
CC_KFLAGS = -D__KERNEL__ -fno-strength-reduce -m486 -malign-loops=2 \
@


1.1.1.3
log
@Import of the vmmon sources from vmware-workstation-3.2.0-2230.
@
text
@a0 1
#!/usr/bin/make -f
d2 1
a2 1
# Copyright (C) 1998-2002 VMware, Inc.
d4 1
a4 1
# $Id: Makefile.dist,v 1.3.18.1 2002/04/02 22:01:26 hpreg Exp $
d7 1
a7 1
####  VMware vmmon Makefile to be distributed externally
a19 3
# Grep program
GREP = /bin/grep

d40 2
a47 3
COMPILER_VERSION := $(shell $(CC) --version)
IS_GCC_30 := $(shell if echo $(COMPILER_VERSION) | $(GREP) -q '^3\.0'; then echo yes; else echo no; fi)

d56 1
a56 1
CC_KFLAGS = -D__KERNEL__ -fno-strength-reduce -malign-loops=2 \
a58 6
# Gcc 3.0 deprecates -m486 --hpreg
ifeq ($(IS_GCC_30),yes)
CC_KFLAGS += -march=i586
else
CC_KFLAGS += -m486
endif
d65 1
a65 1
ifeq ($(shell $(GREP) 'FIX_IO_APIC_BASE_0' $(HEADER_DIR)/asm/fixmap.h 2>/dev/null),)
d74 1
a74 1
C_TARGETS_COMMON = vmx86.o task.o memtrack.o phystrack.o cpuid.o
@


