2017-01-01 23:03:06 +00:00
|
|
|
#
|
|
|
|
# Makefile for Serwer
|
|
|
|
#
|
|
|
|
# Author: overflowerror
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
DEFS = -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
|
|
|
|
CFLAGS = -Wall -g -std=c99 -pedantic -DENDEBUG $(DEFS)
|
|
|
|
LDFLAGS = $(DEFS)
|
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
|
|
|
all: test
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2017-01-02 16:39:42 +00:00
|
|
|
exmaple: exmaple.o webserver.o help.o
|
2017-01-01 23:03:06 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2017-01-02 16:39:42 +00:00
|
|
|
exmaple.o: exmaple.c webserver.h
|
2017-01-01 23:03:06 +00:00
|
|
|
|
|
|
|
help.o: help.c help.h
|
|
|
|
|
|
|
|
webserver.o: webserver.c webserver.h help.h
|
|
|
|
|
|
|
|
clean:
|
2017-01-02 16:39:42 +00:00
|
|
|
rm -f *.o example
|