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-04-07 20:11:21 +00:00
|
|
|
## Datum poslednej upravy: 6.4.2020 ##
|
2020-03-11 21:01:54 +00:00
|
|
|
##################################################
|
|
|
|
|
|
|
|
#prekladac
|
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
#prepinace pre prekladac
|
2020-04-07 20:11:21 +00:00
|
|
|
CFLAGS = -Wcpp -Werror -I./../wolfssl/
|
|
|
|
LIB =
|
2020-03-30 01:32:44 +00:00
|
|
|
|
|
|
|
ifeq ($(OS), Windows_NT)
|
|
|
|
ifeq ($(PROCESSOR_ARCHITECTURE), AMD64)
|
2020-04-07 20:11:21 +00:00
|
|
|
LIB += -L./../wolfssl/64bit_kniznice/ -lwolfssl -lws2_32 -m64
|
2020-03-30 01:32:44 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PROCESSOR_ARCHITECTURE), x86)
|
2020-04-07 20:11:21 +00:00
|
|
|
LIB += -L./../wolfssl/32bit_kniznice/ -lwolfssl -lws2_32 -Os
|
2020-03-30 01:32:44 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S), Linux)
|
2020-04-07 20:11:21 +00:00
|
|
|
LIB += -lwolfssl
|
2020-03-30 01:32:44 +00:00
|
|
|
endif
|
|
|
|
endif
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
all: klient server
|
|
|
|
|
|
|
|
klient: klient.o kryptografia.o komunikacia.o rs232.o
|
2020-03-30 01:32:44 +00:00
|
|
|
$(CC) $(CFLAGS) -o klient klient.o kryptografia.o komunikacia.o rs232.o $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
server: server.o kryptografia.o komunikacia.o rs232.o
|
2020-03-30 01:32:44 +00:00
|
|
|
$(CC) $(CFLAGS) -o server server.o kryptografia.o komunikacia.o rs232.o $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
klient.o: klient.c
|
2020-03-30 01:32:44 +00:00
|
|
|
$(CC) $(CFLAGS) -c klient.c $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
server.o: server.c
|
2020-03-30 01:32:44 +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-30 01:32:44 +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-30 01:32:44 +00:00
|
|
|
$(CC) $(CFLAGS) -c ../kniznica/komunikacia.c $(LIB)
|
2020-03-11 21:01:54 +00:00
|
|
|
|
|
|
|
rs232.o: ../kniznica/rs232.c ../kniznica/rs232.h
|
2020-03-30 01:32:44 +00:00
|
|
|
$(CC) $(CFLAGS) -c ../kniznica/rs232.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
|