-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 806 Bytes
/
Makefile
File metadata and controls
41 lines (33 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# cebsocket is a lightweight WebSocket library for C
#
# https://github.com/rohanrhu/cebsocket
#
# Licensed under MIT
# Copyright (C) 2020, Oğuzhan Eroğlu (https://oguzhaneroglu.com/) <rohanrhu2@gmail.com>
#
CC = gcc
CL = ld
CFLAGS = -std=c99 \
-I. \
-g \
-lssl \
-lcrypto \
-lpthread \
-lm
SOURCES = $(shell find . -wholename "./src/*.c")
HEADERS = $(shell find . -wholename "./include/*.h")
OBJECTS = $(notdir $(SOURCES:.c=.o))
RM = rm -rf
.PHONY: clean
all: cebsocket.o
util.o:
$(CC) -c -o $@ src/util.c $(CFLAGS)
cebsocket.o: util.o
$(CC) -c -o _cebsocket.o src/cebsocket.c $(CFLAGS)
$(CL) -r util.o _cebsocket.o -o cebsocket.o
$(RM) _cebsocket.o
$(RM) util.o
clean:
make clean -C examples/hello
$(RM) $(OBJECTS) _cebsocket.o