-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (26 loc) · 739 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (26 loc) · 739 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
32
33
34
35
36
37
38
39
40
41
42
43
44
PWD=$(shell pwd)
INCS=
LIBEDIT_DIR=
DEBUG=-g -ggdb -gstabs+
BASE_FLAGS=$(INCS) $(DEBUG) $(LIBEDIT_DIR) -lpthread #-fPIC
LDFLAGS=-L.
CC_CFLAGS=$(BASE_FLAGS) #-Wl,-rpath=/usr/local/lib/
CXX_CFLAGS=$(BASE_FLAGS) #-Wl,-rpath=/usr/local/lib/
CC=gcc
CXX=g++
#OBJS=Main.o tinyweb.o tools.o
#SRC=Main.c tinyweb.c tools.c
#HEADERS=tinyweb.h tools.h
#SOLINK=-shared -Xlinker -x
all: tinyweb
tinyweb: tools.o tinyweb.o Main.o libuv.a
$(CC) $(CC_CFLAGS) $(CFLAGS) -o tinyweb Main.o tinyweb.o tools.o -lrt libuv.a
@echo make tinyweb done.
libuv.a:
cp /usr/local/lib/libuv.a ./
%.o: %.c $(HEADERS)
$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
%.o: %.cpp $(HEADERS)
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) -c $< -o $@
clean:
rm -f *.o *.a