30 lines
662 B
Makefile
30 lines
662 B
Makefile
|
# Makefile created by Martin Janitor
|
||
|
# DP1
|
||
|
# 9.5.2023
|
||
|
|
||
|
CC=gcc
|
||
|
CFLAGS=-Wall -Wextra
|
||
|
LIBS= -lcrypto -lssl
|
||
|
SRC_CLIENT= ./CLIENT/
|
||
|
SRC_SERVER= ./SERVER/
|
||
|
OPTIONAL= -DAUTHENTICATION
|
||
|
|
||
|
ifeq ($(OS),Windows_NT)
|
||
|
# Windows-specific options
|
||
|
LIBS += -I C:\OPENSSL\include -L C:\OPENSSL\lib -lws2_32
|
||
|
endif
|
||
|
|
||
|
#I C:\BATCHES\include
|
||
|
#L C:\BATCHES\lib
|
||
|
|
||
|
all: server_run client_run
|
||
|
|
||
|
server_run: $(SRC_SERVER)server.c
|
||
|
$(CC) $(CFLAGS) -o server_run $(SRC_SERVER)server.c $(LIBS) $(OPTIONAL)
|
||
|
|
||
|
client_run: $(SRC_CLIENT)client.c
|
||
|
$(CC) $(CFLAGS) -o client_run $(SRC_CLIENT)client.c $(LIBS) $(OPTIONAL)
|
||
|
|
||
|
clean:
|
||
|
rm -f server client
|
||
|
del server.exe client.exe
|