summaryrefslogtreecommitdiffstats
path: root/src/Make_cyg.mak
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-01-25 21:53:18 +0000
committerBram Moolenaar <Bram@vim.org>2005-01-25 21:53:18 +0000
commit281bdcec60a64ccd0b613ecaf2379e46b21c9912 (patch)
treeee9ae0d64a0d6a1a9c79af614acb00f380e4e0f1 /src/Make_cyg.mak
parentaab21c3533cde8f667e06548db858237870b70e7 (diff)
updated for version 7.0044
Diffstat (limited to 'src/Make_cyg.mak')
-rw-r--r--src/Make_cyg.mak37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
index 962e22e6bd..5319994ead 100644
--- a/src/Make_cyg.mak
+++ b/src/Make_cyg.mak
@@ -18,6 +18,16 @@
# RUBY define to path to Ruby dir to get Ruby support (not defined)
# RUBY_VER define to version of Ruby being used (16)
# DYNAMIC_RUBY no or yes: use yes to load the Ruby DLL dynamically (yes)
+# MZSCHEME define to path to MzScheme dir to get MZSCHEME support (not defined)
+# MZSCHEME_VER define to version of MzScheme being used (209_000)
+# DYNAMIC_MZSCHEME no or yes: use yes to load the MzScheme DLLs dynamically (yes)
+# MZSCHEME_DLLS path to MzScheme DLLs (libmzgc and libmzsch).
+# Is used for DYNAMIC_MZSCHEME=no only.
+# c:/windows/system32 isn't a good idea, copy them to some
+# dir and point MZSCHEME_DLLS to this dir.
+# By default $(MZSCHEME) will be used. You can remove
+# these DLLs from $(MZSCHEME_DLLS) after you
+# built Vim (they are used for dll "static" linking only)
# GETTEXT no or yes: set to yes for dynamic gettext support (yes)
# ICONV no or yes: set to yes for dynamic iconv support (yes)
# MBYTE no or yes: set to yes to include multibyte support (yes)
@@ -190,6 +200,33 @@ endif
endif
##############################
+# DYNAMIC_MZSCHEME=yes works
+# DYNAMIC_MZSCHEME=no works too
+##############################
+ifdef MZSCHEME
+DEFINES += -DFEAT_MZSCHEME
+INCLUDES += -I$(MZSCHEME)/include
+EXTRA_OBJS += $(OUTDIR)/if_mzsch.o
+
+ifndef DYNAMIC_MZSCHEME
+DYNAMIC_MZSCHEME = yes
+endif
+
+ifndef MZSCHEME_VER
+MZSCHEME_VER = 209_000
+endif
+
+ifeq (yes, $(DYNAMIC_MZSCHEME))
+DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
+else
+ifndef MZSCHEME_DLLS
+MZSCHEME_DLLS = $(MZSCHEME)
+endif
+EXTRA_LIBS += -L$(MZSCHEME_DLLS) -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
+endif
+endif
+
+##############################
# DYNAMIC_TCL=yes and no both work.
##############################
ifdef TCL
800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * common keywest i2c layer
 *
 * Copyright (c) by Takashi Iwai <tiwai@suse.de>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */


#include <sound/driver.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/i2c-dev.h>
#include <linux/slab.h>
#include <sound/core.h>
#include "pmac.h"

/*
 * we have to keep a static variable here since i2c attach_adapter
 * callback cannot pass a private data.
 */
static struct pmac_keywest *keywest_ctx;


#define I2C_DRIVERID_KEYWEST	0xFEBA

static int keywest_attach_adapter(struct i2c_adapter *adapter);
static int keywest_detach_client(struct i2c_client *client);

struct i2c_driver keywest_driver = {  
	.name = "PMac Keywest Audio",
	.id = I2C_DRIVERID_KEYWEST,
	.attach_adapter = &keywest_attach_adapter,
	.detach_client = &keywest_detach_client,
};


#ifndef i2c_device_name
#define i2c_device_name(x)	((x)->name)
#endif

static int keywest_attach_adapter(struct i2c_adapter *adapter)
{
	int err;
	struct i2c_client *new_client;

	if (! keywest_ctx)
		return -EINVAL;

	if (strncmp(i2c_device_name(adapter), "mac-io", 6))
		return 0; /* ignored */

	new_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
	if (! new_client)
		return -ENOMEM;

	memset(new_client, 0, sizeof(*new_client));
	new_client->addr = keywest_ctx->addr;
	i2c_set_clientdata(new_client, keywest_ctx);
	new_client->adapter = adapter;
	new_client->driver = &keywest_driver;
	new_client->flags = 0;

	strcpy(i2c_device_name(new_client), keywest_ctx->name);
	keywest_ctx->client = new_client;
	
	/* Tell the i2c layer a new client has arrived */
	if (i2c_attach_client(new_client)) {
		snd_printk(KERN_ERR "tumbler: cannot attach i2c client\n");
		err = -ENODEV;
		goto __err;
	}

	return 0;

 __err:
	kfree(new_client);
	keywest_ctx->client = NULL;
	return err;
}

static int keywest_detach_client(struct i2c_client *client)
{
	if (! keywest_ctx)
		return 0;
	if (client == keywest_ctx->client)
		keywest_ctx->client = NULL;

	i2c_detach_client(client);
	kfree(client);
	return 0;
}

/* exported */
void snd_pmac_keywest_cleanup(struct pmac_keywest *i2c)
{
	if (keywest_ctx && keywest_ctx == i2c) {
		i2c_del_driver(&keywest_driver);
		keywest_ctx = NULL;
	}
}

int __init snd_pmac_tumbler_post_init(void)
{
	int err;
	
	if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) {
		snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err);
		return err;
	}
	return 0;
}

/* exported */
int __init snd_pmac_keywest_init(struct pmac_keywest *i2c)
{
	int err;

	if (keywest_ctx)
		return -EBUSY;

	keywest_ctx = i2c;

	if ((err = i2c_add_driver(&keywest_driver))) {
		snd_printk(KERN_ERR "cannot register keywest i2c driver\n");
		return err;
	}
	return 0;
}