diff options
author | Emil Renner Berthing <esmil@mailme.dk> | 2011-06-11 19:41:55 +0200 |
---|---|---|
committer | Emil Renner Berthing <esmil@mailme.dk> | 2011-06-11 19:41:55 +0200 |
commit | 87c8cc5b2dd81f9b17eb40d2eb165d3e946aaf21 (patch) | |
tree | 0a05e14f1480b946ddad3b020ef5adf6d632e9e0 | |
parent | 0b3d18658aa1a5236b0c6ecfb5939eaaa14376a2 (diff) | |
download | lem-87c8cc5b2dd81f9b17eb40d2eb165d3e946aaf21.tar.gz lem-87c8cc5b2dd81f9b17eb40d2eb165d3e946aaf21.tar.xz lem-87c8cc5b2dd81f9b17eb40d2eb165d3e946aaf21.zip |
fix compilation on OSX
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | config.Darwin | 41 |
2 files changed, 48 insertions, 1 deletions
@@ -21,6 +21,12 @@ BINDIR = $(PREFIX)/bin INCDIR = $(PREFIX)/include PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig +ifeq ($(OS),Darwin) +SHARED = -dynamiclib -Wl,-undefined,dynamic_lookup +else +SHARED = -shared +endif + ifeq ($(LUA),embedded) CFLAGS += -Ilua -DLUA_USE_LINUX -DLUA_ROOT='"$(PREFIX)/"' LIBRARIES = -lm @@ -97,7 +103,7 @@ lem: $(objects) utils.so: utils.pic.o $Mecho ' LD $@' - $O$(CC) -shared $(LDFLAGS) $^ -o $@ + $O$(CC) $(SHARED) $(LDFLAGS) $^ -o $@ %-strip: % $Mecho ' STRIP $<' diff --git a/config.Darwin b/config.Darwin new file mode 100644 index 0000000..d1203ad --- /dev/null +++ b/config.Darwin @@ -0,0 +1,41 @@ +/* + * This file is part of LEM, a Lua Event Machine. + * Copyright 2011 Emil Renner Berthing + * + * LEM 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 3 of + * the License, or (at your option) any later version. + * + * LEM 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 LEM. If not, see <http://www.gnu.org/licenses/>. + */ + +#define EV_STANDALONE 1 +#define EV_USE_MONOTONIC 1 +#define EV_USE_CLOCK_SYSCALL 0 +#define EV_USE_NANOSLEEP 1 +#define EV_USE_EVENTFD 0 + +#define EV_USE_SELECT 0 +#define EV_USE_POLL 0 +#define EV_USE_EPOLL 0 +#define EV_USE_KQUEUE 1 +#define EV_USE_PORT 0 + +#define EV_MULTIPLICITY 0 + +#define EV_PERIODIC_ENABLE 0 +#define EV_IDLE_ENABLE 1 +#define EV_EMBED_ENABLE 0 +#define EV_STAT_ENABLE 0 +#define EV_FORK_ENABLE 0 +#define EV_ASYNC_ENABLE 0 + +#define EV_MINPRI 0 +#define EV_MAXPRI 0 |