aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWojtek Kosior <wk@koszkonutek-tmp.pl.eu.org>2021-04-30 00:33:56 +0200
committerWojtek Kosior <wk@koszkonutek-tmp.pl.eu.org>2021-04-30 00:33:56 +0200
commitaa4d426b4d3527d7e166df1a05058c9a4a0f6683 (patch)
tree4ff17ce8b89a2321b9d0ed4bcfc37c447bcb6820 /Makefile
downloadsmtps-and-pop3s-console-program-aa4d426b4d3527d7e166df1a05058c9a4a0f6683.tar.gz
smtps-and-pop3s-console-program-aa4d426b4d3527d7e166df1a05058c9a4a0f6683.zip
initial/final commitHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bc6ca14
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,42 @@
+# Previously there were also:
+# * -Ilibspopc-0.12/ in INCLUDEFLAGS
+# * -Llibspopc-0.12/ and -lspopc in LIBFLAGS
+# * -DUSE_SSL in CFLAGS
+# libspopc now got replaced with VMime, which also handles mail parsing
+INCLUDEFLAGS = -Iiniparser-4.1/src/ -Ivmime-master/src/ \
+ -Ivmime-master/config_header/
+
+LIBFLAGS = -static -Lvmime-master/ -Lopenssl-1.1.0h/ -Liniparser-4.1/ \
+ -liniparser -lvmime -lssl -lcrypto -lcrypt32 -lws2_32 -lwsock32
+CC = i686-w64-mingw32-gcc
+CXX = i686-w64-mingw32-g++
+STRIP = i686-w64-mingw32-strip
+CFLAGS = $(INCLUDEFLAGS) -Wall -O2 -std=c11
+CXXFLAGS = $(INCLUDEFLAGS) -Wall -O2 -std=c++11
+
+PROGRAMS = pop.exe push.exe
+COMMON_O = config.o messages.o misc.o CA_store.o timeout_handler.o exceptions.o
+POP_OBJECTS = pop.o $(COMMON_O)
+PUSH_OBJECTS = push.o $(COMMON_O)
+
+all: $(PROGRAMS)
+
+# stripping nie jest konieczny, ale zmniejsza rozmiar pliku o ponad 25%
+pop.exe: $(POP_OBJECTS)
+ $(CXX) $^ $(LIBFLAGS) -o $@
+ $(STRIP) $@
+
+push.exe: $(PUSH_OBJECTS)
+ $(CXX) $^ $(LIBFLAGS) -o $@
+ $(STRIP) $@
+
+clean:
+ -rm -f $(PROGRAMS) *.o
+
+%.o: %.c
+ $(CC) -c $< -o $@ $(CFLAGS)
+
+%.o: %.cpp
+ $(CXX) -c $< -o $@ $(CXXFLAGS)
+
+.PHONY: all clean