################################################## ## Bakalarska praca ## ## Meno studenta: Tomas Lukac ## ## Veduci BP: prof. Ing. Milos Drutarovsky CSc. ## ## Skola: KEMT FEI TUKE ## ## Datum poslednej upravy: 6.5.2020 ## ################################################## #prekladac CC = gcc #prepinace pre prekladac CFLAGS = -Wcpp -Werror -I./../../externe_kniznice/ 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) LDFLAGS += -L./../../externe_kniznice/64bit_dll/ -lwolfssl -lws2_32 -lzlib1 -lrs232 endif ifeq ($(PROCESSOR_ARCHITECTURE), x86) ARCH += -m32 CFLAGS += $(ARCH) LDFLAGS += -L./../../externe_kniznice/32bit_dll/ -lwolfssl -lws2_32 -lzlib1 -lrs232 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)