chiark / gitweb /
Sort of works ...
[jarrg-ian.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..cce8b95
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+OPTIMISE=      -O2
+LDFLAGS=       -g
+LIBS=          -ldl -lc
+CFLAGS=                -g $(OPTIMISE) \
+               -Wall -Wwrite-strings -Wpointer-arith -Wimplicit \
+               -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes
+CPPFLAGS=
+
+MAJOR=1
+MINOR=0
+LIBCANON=      libjwrap.so.$(MAJOR)
+LIBTARGET=     $(LIBCANON).$(MINOR)
+
+TARGETS=                $(LIBTARGET)
+
+all:                    $(TARGETS)
+
+
+$(LIBTARGET):          libjwrap.o
+               ld -shared -soname $(LIBCANON) -o $@ $< $(LIBS)
+
+libjwrap.o:          libjwrap.c
+               $(CC) -D_REENTRANT $(CFLAGS) $(CPPFLAGS) -c -o $@ -fPIC $<