2020-04-16 09:25:05 +00:00
|
|
|
##################################################
|
|
|
|
## Bakalarska praca ##
|
|
|
|
## Meno studenta: Tomas Lukac ##
|
|
|
|
## Veduci BP: prof. Ing. Milos Drutarovsky CSc. ##
|
|
|
|
## Skola: KEMT FEI TUKE ##
|
2020-05-06 10:53:08 +00:00
|
|
|
## Datum poslednej upravy: 6.5.2020 ##
|
2020-04-16 09:25:05 +00:00
|
|
|
##################################################
|
|
|
|
|
|
|
|
#prekladac
|
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
#prepinace pre prekladac
|
2020-05-06 10:46:52 +00:00
|
|
|
CFLAGS = -Wcpp -Werror -I./../../externe_kniznice/
|
2020-04-16 09:25:05 +00:00
|
|
|
SOURCES = $(wildcard ../../kniznica/*.c) \
|
|
|
|
$(wildcard *.c)
|
|
|
|
OBJECTS = $(SOURCES:.c=.o)
|
|
|
|
EXECUTABLE = klient
|
|
|
|
|
|
|
|
ifeq ($(OS), Windows_NT)
|
|
|
|
CLEAN += del *.o *.exe
|
|
|
|
ifeq ($(PROCESSOR_ARCHITECTURE), AMD64)
|
|
|
|
ARCH += -m64
|
|
|
|
CFLAGS += $(ARCH)
|
2020-05-06 10:46:52 +00:00
|
|
|
LDFLAGS += -L./../../externe_kniznice/64bit_dll/ -lwolfssl -lws2_32 -lzlib1 -lrs232
|
2020-04-16 09:25:05 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PROCESSOR_ARCHITECTURE), x86)
|
|
|
|
ARCH += -m32
|
|
|
|
CFLAGS += $(ARCH)
|
2020-05-06 10:46:52 +00:00
|
|
|
LDFLAGS += -L./../../externe_kniznice/32bit_dll/ -lwolfssl -lws2_32 -lzlib1 -lrs232
|
2020-04-16 09:25:05 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S), Linux)
|
|
|
|
LDFLAGS += -lwolfssl
|
|
|
|
CLEAN += rm *.o $(EXECUTABLE)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(EXECUTABLE)
|
|
|
|
|
|
|
|
$(EXECUTABLE): $(OBJECTS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(CLEAN)
|