this makes it easier to do windows builds
TARGET := ircd
SOURCES := \
src/main.c \
+ src/admin.c \
src/irc.c \
src/ircfmt.c \
src/net.c \
HEADERS := \
src/common.h \
src/config.h \
+ src/admin.h \
src/irc.h \
src/ircfmt.h \
src/net.h \
-include config.mk
ifdef USE_LUA
-SOURCES += src/admin.c
-HEADERS += src/admin.h
CFLAGS += -DHAS_LUA $(shell pkg-config --cflags lua5.4)
LDLIBS += $(shell pkg-config --libs lua5.4)
endif
+#ifdef HAS_LUA
#include "admin.h"
#include "irc.h"
#include "ircfmt.h"
lua_pop(L, 1);
return rv;
}
+#endif
#ifndef ADMIN_H_
#define ADMIN_H_
+#ifdef HAS_LUA
#include "common.h"
void admin_init(void);
void admin_fini(void);
int admin_command(struct client_data *client, char *source, char *command, int argc, char *args[]);
int admin_hook(const char *hook, struct client_data *cl1, struct client_data *cl2, struct channel *chan, char *txt);
#endif
+#endif
extern struct client_data *clients;
extern struct client_data *dyingclients;
-#ifdef HAS_LUA
#include "admin.h"
#endif
-#endif