summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Friloux <guillaume.friloux@gmail.com>2013-08-13 22:32:28 +0200
committerGuillaume Friloux <guillaume.friloux@gmail.com>2013-08-13 22:32:28 +0200
commitbd4750e18680c0293862637ffedaf377783ea3f5 (patch)
tree62cc28f7bd92b44a5bef222c806b8aefbaf815e6
parent5f5b37600c15a075e3b083ee28080043f6df9152 (diff)
Add module management.
-rw-r--r--src/modules/.deps/libmega.Plo1
-rw-r--r--src/modules/.deps/src_modules_mega_la-mega.Plo1
-rw-r--r--src/modules/Makefile.mk16
-rw-r--r--src/modules/mega/mega_main.c13
4 files changed, 31 insertions, 0 deletions
diff --git a/src/modules/.deps/libmega.Plo b/src/modules/.deps/libmega.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/src/modules/.deps/libmega.Plo
@@ -0,0 +1 @@
# dummy
diff --git a/src/modules/.deps/src_modules_mega_la-mega.Plo b/src/modules/.deps/src_modules_mega_la-mega.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/src/modules/.deps/src_modules_mega_la-mega.Plo
@@ -0,0 +1 @@
# dummy
diff --git a/src/modules/Makefile.mk b/src/modules/Makefile.mk
new file mode 100644
index 0000000..dec7b2d
--- /dev/null
+++ b/src/modules/Makefile.mk
@@ -0,0 +1,16 @@
1MODULE_CPPFLAGS= \
2-I$(top_srcdir) \
3-I$(top_srcdir)/src/include \
4-I$(top_srcdir)/src/lib
5
6moddir = $(libdir)/skypunch/$(MODULE_ARCH)
7mod_LTLIBRARIES = src/modules/mega.la
8
9src_modules_mega_la_SOURCES = \
10src/modules/mega/mega_main.c
11
12src_modules_mega_la_CFLAGS = @SKYPUNCH_CFLAGS@
13src_modules_mega_la_LIBADD = \
14src/lib/libskypunch.la
15src_modules_mega_la_CPPFLAGS= $(MODULE_CPPFLAGS)
16src_modules_mega_la_LDFLAGS = -no-undefined -module -avoid-version
diff --git a/src/modules/mega/mega_main.c b/src/modules/mega/mega_main.c
new file mode 100644
index 0000000..cdb60e9
--- /dev/null
+++ b/src/modules/mega/mega_main.c
@@ -0,0 +1,13 @@
1#include <skypunch_private.h>
2
3Skypunch_Type
4skypunch_module_init(Skypunch *skypunch)
5{
6 if (!skypunch)
7 return SKYPUNCH_MEGA;
8
9 INFO("Skypunch type for %p set to mega.co.nz");
10
11 skypunch->type = SKYPUNCH_MEGA;
12 return SKYPUNCH_MEGA;
13}