add Makefile

This commit is contained in:
Dany LE 2023-06-23 09:27:37 +02:00
parent af3a063299
commit ad2c32f87e
2 changed files with 34 additions and 3 deletions

4
.gitignore vendored
View File

@ -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)

33
Makefile Normal file
View File

@ -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