From ad2c32f87e6161c6f50ce686aada22a3dd9aa648 Mon Sep 17 00:00:00 2001 From: Dany LE Date: Fri, 23 Jun 2023 09:27:37 +0200 Subject: [PATCH] add Makefile --- .gitignore | 4 +--- Makefile | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index e7c2d04..6c46149 100644 --- a/.gitignore +++ b/.gitignore @@ -137,6 +137,4 @@ m4/lt~obsolete.m4 # Generated Makefile # (meta build system like autotools, # can automatically generate from config.status script -# (which is called by configure script)) -Makefile - +# (which is called by configure script) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..868ccb0 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +LUAINC?=/usr/include +CC?=gcc + + +OBJS = limap.o + +.PHONY: limap clean uwimap all +#$(OBJS) + +CFLAGS = +LDFLAGS = -lcrypt -lssl -lcrypto + +all: uwimap limap + @echo "DONE" + +uwimap: + cd imap && make slx EXTRACFLAGS="-fPIC -I/usr/include/openssl" + +%.o: %.c + @echo "building obj files" + $(CC) -I$(LUAINC) -I./imap/c-client/ -fPIC $(CFLAGS) -c $< -o $@ + +limap: $(OBJS) + @echo "building shared library" + $(CC) -shared \ + $(OBJS) \ + imap/c-client/c-client.a \ + $(LDFLAGS) -o limap.so + +clean: + @echo "Clean all" + cd imap && make clean + - rm -rf *.o *.so *.a