summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-05-29 16:34:00 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-05-29 16:34:00 -0400
commit3a581cea65b2bd2784fed8d96a7ac803b33074c5 (patch)
tree376bb157c1cc2e132e69a00f5d3f7cde5106beb5 /src
parentca4efef04651a0180682b0df42e4140e3e772a60 (diff)
downloadslapi-nis-3a581cea65b2bd2784fed8d96a7ac803b33074c5.tar.gz
slapi-nis-3a581cea65b2bd2784fed8d96a7ac803b33074c5.tar.xz
slapi-nis-3a581cea65b2bd2784fed8d96a7ac803b33074c5.zip
- build infrastructure
- actually write that this is GPLv2
Diffstat (limited to 'src')
-rw-r--r--src/Makefile14
-rw-r--r--src/Makefile.am28
2 files changed, 28 insertions, 14 deletions
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 39a1a05..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-CFLAGS = $(shell pkg-config --cflags nspr nss) -g3 -O1 -Wall -Wimplicit -Wextra -Wno-unused -Wuninitialized -fPIC -D_REENTRANT
-LDFLAGS = -lnsl -lpthread
-
-all:: plugin.so dummyplugin.so portmap
-
-plugin.so: backend.c dispatch.c map.c nis.c plugin.c portmap.c defaults.h format.c defaults.c
- $(CC) $(CFLAGS) -shared -o $@ $^ $(LDFLAGS)
-dummyplugin.so: dispatch.c dummymap.c nis.c plugin.c plugin.h portmap.c
- $(CC) $(CFLAGS) -shared -o $@ $^ $(LDFLAGS)
-portmap: portmap.c
- $(CC) $(CFLAGS) -o $@ -DPORTMAP_MAIN $^ $(LDFLAGS)
-
-clean:
- $(RM) portmap plugin.so dummyplugin.so
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..e18337e
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,28 @@
+if GCC
+AM_CFLAGS = $(RUNTIME_CFLAGS) -Wall -Wimplicit -Wextra -Wuninitialized
+else
+AM_CFLAGS = $(RUNTIME_CFLAGS)
+endif
+AM_LDFLAGS = -module -avoid-version
+LIBADD = $(RUNTIME_LIBS) -lnsl -lpthread
+
+plugindir = $(libdir)/dirsrv/plugins
+
+plugin_LTLIBRARIES = nis-plugin.la
+nis_plugin_la_SOURCES = \
+ backend.c \
+ dispatch.c \
+ format.c \
+ defaults.c \
+ map.c \
+ nis.c \
+ plugin.c \
+ portmap.c
+
+EXTRA_LTLIBRARIES = dummy-nis-plugin.la
+dummy_nis_plugin_la_SOURCES = \
+ dispatch.c \
+ dummymap.c \
+ nis.c \
+ plugin.c \
+ portmap.c