2017-01-01 23:03:06 +00:00
|
|
|
#
|
|
|
|
# Makefile for Serwer
|
|
|
|
#
|
|
|
|
# Author: overflowerror
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
DEFS = -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
|
2017-01-02 22:01:06 +00:00
|
|
|
CFLAGS = -Wall -Wextra -g -std=c99 -pedantic -DENDEBUG $(DEFS) -fPIC
|
2017-01-01 23:03:06 +00:00
|
|
|
LDFLAGS = $(DEFS)
|
2017-01-02 22:01:06 +00:00
|
|
|
LIBFLAGS = -shared $(DEFS)
|
2017-01-01 23:03:06 +00:00
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
2017-01-02 22:01:06 +00:00
|
|
|
all: example libserwer.so
|
2017-01-01 23:03:06 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2017-01-02 21:48:49 +00:00
|
|
|
example: example.o serwer.o ws_linear.o ws_utils.o help.o
|
2017-01-01 23:03:06 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2017-01-02 22:01:06 +00:00
|
|
|
libserwer.so: serwer.o ws_linear.o ws_utils.o help.o
|
|
|
|
$(CC) $(LIBFLAGS) -o $@ $^
|
|
|
|
|
2017-01-02 21:48:49 +00:00
|
|
|
example.o: example.c serwer.h help.h
|
2017-01-01 23:03:06 +00:00
|
|
|
help.o: help.c help.h
|
2017-01-02 21:48:49 +00:00
|
|
|
serwer.o: serwer.c serwer.h ws_types.h ws_modes.h ws_utils.h help.h
|
2017-01-02 21:31:05 +00:00
|
|
|
ws_utils.o: ws_utils.c ws_utils.h ws_types.h
|
2017-01-02 21:48:49 +00:00
|
|
|
ws_linear.o: ws_linear.c ws_modes.h ws_types.h serwer.h ws_utils.h
|
2017-01-01 23:03:06 +00:00
|
|
|
|
|
|
|
clean:
|
2017-01-02 22:01:06 +00:00
|
|
|
rm -f *.o example libserwer.so
|