From aa4d426b4d3527d7e166df1a05058c9a4a0f6683 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 00:33:56 +0200 Subject: initial/final commit --- Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3