Add makefile in GNU make format for OS X.
This commit is contained in:
parent
3cbe77cd4f
commit
2ceba3eb71
1 changed files with 34 additions and 0 deletions
34
GNUmakefile
Normal file
34
GNUmakefile
Normal file
|
@ -0,0 +1,34 @@
|
|||
CFLAGS := -Wall -Wextra -Werror -g -O0
|
||||
LIB_SRCS := \
|
||||
pack.c \
|
||||
connection.c \
|
||||
request.c \
|
||||
log.c \
|
||||
hashtable.c \
|
||||
utils.c \
|
||||
sbuf/sbuf.c \
|
||||
transport/socket.c \
|
||||
backend/fs.c
|
||||
|
||||
SERVER_SRCS := \
|
||||
example/server.c
|
||||
|
||||
LIB_OBJS := $(LIB_SRCS:.c=.o)
|
||||
SERVER_OBJS := $(SERVER_SRCS:.c=.o)
|
||||
|
||||
LIB := lib9p.dylib
|
||||
SERVER := server
|
||||
|
||||
all: $(LIB) $(SERVER)
|
||||
|
||||
$(LIB): $(LIB_OBJS)
|
||||
cc -dynamiclib $^ -o $@
|
||||
|
||||
$(SERVER): $(SERVER_OBJS)
|
||||
cc $< -o $(SERVER) -L. -l9p
|
||||
|
||||
clean:
|
||||
rm -f $(LIB_OBJS) $(SERVER_OBJS)
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
Loading…
Add table
Reference in a new issue