
7 семестр / Готовые отчеты / ММиВА. Лабораторная работа 5
.pdf
Таблица 6. Общий сборочный файл «WinMakefile» / «LinuxMakefile»
WinMakefile
.PHONY : clean remake CC = gcc
CFLAGS = -O2 -std=c99 -Waggregate-return -Wall -Wbad-function-cast -Wcast-align -Wcast-qual \ -Wdeclaration-after-statement -Wdisabled-optimization -Wdouble-promotion -Werror \ -Wextra -Wfatal-errors -Wfloat-equal -Wframe-larger-than=5000 -Winit-self \ -Winline -Winvalid-pch -Wlarger-than=10000 -Wno-deprecated-declarations \ -Wmissing-include-dirs -Wnested-externs -Wno-aggressive-loop-optimizations \
-Wold-style-definition -Wpacked -Wpedantic -pedantic-errors -Wredundant-decls -Wshadow \ -Wstack-protector -Wstrict-aliasing -Wstrict-overflow=5 -Wstrict-prototypes \ -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized -Wunknown-pragmas \ -Wunused-parameter -Wvla -Wwrite-strings -Wstack-usage=5000 -Wno-format \ -Wjump-misses-init -Wlogical-op -Wnormalized=nfkc -Wtrampolines \
-Wsync-nand -Wunsuffixed-float-constants -Wvector-operation-performance \ -fstack-protector-all -fstrict-overflow -MD -DPOP3_OPENSSL
all: ./pop3_lib/pop3_lib.o pop3_client.o
./pop3_lib/pop3_lib.o: ./pop3_lib/pop3_lib.h ./pop3_lib/pop3_lib.c
cd pop3_lib && make --file=WinMakefile && cd ../ && make remake --file=WinMakefile
.c.o: .c
$(CC) $(CFLAGS) -c -o $(?:.c=.o) $? -I./pop3_lib/
$(CC) $(CFLAGS) -o $(?:.c=.exe) $(?:.c=.o) ./pop3_lib/pop3_lib.o \ -L"C:\Program Files\OpenSSL-Win64\lib" -llibssl -llibcrypto -lWs2_32
clean:
del /s /q pop3_client.o pop3_client.d pop3_client.exe
remake: clean all
LinuxMakefile
.PHONY : clean remake CC = gcc
CFLAGS = -O2 -std=c99 -Waggregate-return -Wall -Wbad-function-cast -Wcast-align -Wcast-qual \ -Wdeclaration-after-statement -Wdisabled-optimization -Wdouble-promotion -Werror \ -Wextra -Wfatal-errors -Wfloat-equal -Wframe-larger-than=5000 -Winit-self \ -Winline -Winvalid-pch -Wlarger-than=10000 -Wno-deprecated-declarations \ -Wmissing-include-dirs -Wnested-externs -Wno-aggressive-loop-optimizations \
-Wold-style-definition -Wpacked -Wpedantic -pedantic-errors -Wredundant-decls -Wshadow \ -Wstack-protector -Wstrict-aliasing -Wstrict-overflow=5 -Wstrict-prototypes \ -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized -Wunknown-pragmas \ -Wunused-parameter -Wvla -Wwrite-strings -Wstack-usage=5000 -Wno-format \ -Wjump-misses-init -Wlogical-op -Wnormalized=nfkc -Wtrampolines \
-Wsync-nand -Wunsuffixed-float-constants -Wvector-operation-performance \ -fstack-protector-all -fstrict-overflow -MD -DPOP3_OPENSSL
all: ./pop3_lib/pop3_lib.o pop3_client.o
./pop3_lib/pop3_lib.o: ./pop3_lib/pop3_lib.h ./pop3_lib/pop3_lib.c
cd pop3_lib && make --file=LinuxMakefile && cd ../ && make remake --file=LinuxMakefile
.c.o: .c
$(CC) $(CFLAGS) -c -o $(?:.c=.o) $? -I./pop3_lib/
$(CC) $(CFLAGS) -o $(?:.c=) $(?:.c=.o) ./pop3_lib/pop3_lib.o -lssl -lcrypto
clean:
rm -rf pop3_client.o pop3_client.d pop3_client remake: clean all
41