2020-03-11 21:01:54 +00:00
|
|
|
##################################################
|
|
|
|
## Bakalarska praca ##
|
|
|
|
## Meno studenta: Tomas Lukac ##
|
|
|
|
## Veduci BP: prof. Ing. Milos Drutarovsky CSc. ##
|
|
|
|
## Skola: KEMT FEI TUKE ##
|
2020-03-12 16:22:08 +00:00
|
|
|
## Datum poslednej upravy: 12.3.2020 ##
|
2020-03-11 21:01:54 +00:00
|
|
|
##################################################
|
|
|
|
|
|
|
|
#prekladac
|
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
#prepinace pre prekladac
|
2020-03-12 16:22:08 +00:00
|
|
|
CFLAGS = -Wcpp -I./../wolfssl_hlavickove_subory/
|
2020-03-19 12:55:34 +00:00
|
|
|
LIB = -L. -lwolfssl
|
|
|
|
|
|
|
|
ifeq ($(OS), Windows_NT)
|
|
|
|
LIB += -lws2_32
|
|
|
|
ifeq ($(PROCESSOR_ARCHITECTURE), AMD64)
|
|
|
|
LIB += -m64
|
|
|
|
endif
|
|
|
|
ifeq ($(PROCESSOR_ARCHITECTURE), x86)
|
|
|
|
LIB += -Os
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S), Linux)
|
|
|
|
LIB +=
|
|
|
|
endif
|
|
|
|
endif
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
all: klient server
|
|
|
|
|
|
|
|
klient: klient.o kryptografia.o komunikacia.o
|
2020-03-19 12:55:34 +00:00
|
|
|
$(CC) $(CFLAGS) -o klient klient.o kryptografia.o komunikacia.o $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
server: server.o kryptografia.o komunikacia.o
|
2020-03-19 12:55:34 +00:00
|
|
|
$(CC) $(CFLAGS) -o server server.o kryptografia.o komunikacia.o $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
klient.o: klient.c
|
2020-03-19 12:55:34 +00:00
|
|
|
$(CC) $(CFLAGS) -c klient.c $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
server.o: server.c
|
2020-03-19 12:55:34 +00:00
|
|
|
$(CC) $(CFLAGS) -c server.c $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
kryptografia.o: ../kniznica/kryptografia.c ../kniznica/kryptografia.h
|
2020-03-19 12:55:34 +00:00
|
|
|
$(CC) $(CFLAGS) -c ../kniznica/kryptografia.c $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
komunikacia.o: ../kniznica/komunikacia.c ../kniznica/komunikacia.h
|
2020-03-19 12:55:34 +00:00
|
|
|
$(CC) $(CFLAGS) -c ../kniznica/komunikacia.c $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean-linux:
|
|
|
|
rm *.o -f klient server
|
|
|
|
|
|
|
|
clean-win:
|
|
|
|
del *.o klient.exe server.exe
|