bakalarska_praca/rs232_kanal/server/Makefile

45 lines
1.2 KiB
Makefile
Raw Permalink Normal View History

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 ##
## Datum poslednej upravy: 5.6.2020 ##
2020-04-16 09:25:05 +00:00
##################################################
#prekladac
CC = gcc
#prepinace pre prekladac
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 = server
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
2020-04-16 09:25:05 +00:00
endif
ifeq ($(PROCESSOR_ARCHITECTURE), x86)
ARCH += -m32
CFLAGS += $(ARCH)
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)