forked from zorxx/microhttpd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 670 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 670 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
# \copyright 2018 Zorxx Software. All rights reserved.
# \license This file is released under the MIT License. See the LICENSE file for details.
# \file Makefile
# \brief microhttpd library build recipe
TARGET := microhttpd
CC ?= gcc
AR ?= ar
RM ?= rm
CFLAGS := -fPIC -O3 -Wall -Werror -I.
CDEFS := DEBUG
SRC = microhttpd.c helpers.c post.c client.c
HEADERS = microhttpd_private.h microhttpd.h
all: lib$(TARGET).a
lib$(TARGET).a: $(foreach src,$(SRC),$(src:.c=.o))
$(info LINK $@)
@$(AR) rcs $@ $^
%.o: %.c
$(info CC $^ -> $@)
@$(CC) $(CFLAGS) $(foreach def,$(CDEFS),-D$(def)) -c $^ -o $@
clean:
$(info CLEAN)
@$(RM) -f *.o lib$(TARGET).a
.PHONY: clean