Serwer/Makefile

31 lines
625 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:31:05 +00:00
example: example.o webserver.o ws_linear.o ws_utils.o help.o
2017-01-01 23:03:06 +00:00
$(CC) $(LDFLAGS) -o $@ $^
2017-01-02 16:46:03 +00:00
example.o: example.c webserver.h
2017-01-01 23:03:06 +00:00
help.o: help.c help.h
2017-01-02 21:31:05 +00:00
webserver.o: webserver.c webserver.h ws_types.h ws_modes.h ws_utils.h help.h
ws_utils.o: ws_utils.c ws_utils.h ws_types.h
ws_linear.o: ws_linear.c ws_modes.h ws_types.h webserver.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