Serwer/Makefile

31 lines
614 B
Makefile
Raw Normal View History

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 16:46:03 +00:00
CFLAGS = -Wall -Wextra -g -std=c99 -pedantic -DENDEBUG $(DEFS)
2017-01-01 23:03:06 +00:00
LDFLAGS = $(DEFS)
.PHONY: all clean
2017-01-02 16:46:03 +00:00
all: example
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 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 16:39:42 +00:00
rm -f *.o example