59 lines
1.5 KiB
Makefile
59 lines
1.5 KiB
Makefile
## Bakalarska praca ##
|
|
## Meno studenta: Tomas Lukac ##
|
|
## Veduci BP: prof. Ing. Milos Drutarovsky CSc. ##
|
|
## Skola: KEMT FEI TUKE ##
|
|
## Datum poslednej upravy: 12.3.2020 ##
|
|
##################################################
|
|
|
|
#prekladac
|
|
CC = gcc
|
|
|
|
#prepinace pre prekladac
|
|
CFLAGS = -Wcpp -I./../wolfssl_hlavickove_subory/
|
|
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
|
|
|
|
all: klient server
|
|
|
|
klient: klient.o kryptografia.o komunikacia.o rs232.o
|
|
$(CC) $(CFLAGS) -o klient klient.o kryptografia.o komunikacia.o rs232.o $(LIB)
|
|
|
|
server: server.o kryptografia.o komunikacia.o rs232.o
|
|
$(CC) $(CFLAGS) -o server server.o kryptografia.o komunikacia.o rs232.o $(LIB)
|
|
|
|
klient.o: klient.c
|
|
$(CC) $(CFLAGS) -c klient.c $(LIB)
|
|
|
|
server.o: server.c
|
|
$(CC) $(CFLAGS) -c server.c $(LIB)
|
|
|
|
kryptografia.o: ../kniznica/kryptografia.c ../kniznica/kryptografia.h
|
|
$(CC) $(CFLAGS) -c ../kniznica/kryptografia.c $(LIB)
|
|
|
|
komunikacia.o: ../kniznica/komunikacia.c ../kniznica/komunikacia.h
|
|
$(CC) $(CFLAGS) -c ../kniznica/komunikacia.c $(LIB)
|
|
|
|
rs232.o: ../kniznica/rs232.c ../kniznica/rs232.h
|
|
$(CC) $(CFLAGS) -c ../kniznica/rs232.c $(LIB)
|
|
|
|
.PHONY: clean
|
|
|
|
clean-linux:
|
|
rm *.o -f klient server
|
|
|
|
clean-win:
|
|
del *.o klient.exe server.exe
|