forked from kala13x/slog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (29 loc) · 801 Bytes
/
Makefile
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
####################################
# Automatically generated by SMake #
# https://github.com/kala13x/smake #
####################################
CFLAGS = -g -O2 -Wall
CFLAGS += -I./src
LIBS = -lpthread
NAME = libslog.a
ODIR = .
OBJ = o
OBJS = slog.$(OBJ)
OBJECTS = $(patsubst %,$(ODIR)/%,$(OBJS))
INSTALL_INC = /usr/local/include
INSTALL_BIN = /usr/local/lib
VPATH = ./src
.c.$(OBJ):
@test -d $(ODIR) || mkdir -p $(ODIR)
$(CC) $(CFLAGS) -c -o $(ODIR)/$@ $< $(LIBS)
$(NAME):$(OBJS)
$(AR) rcs -o $(ODIR)/$(NAME) $(OBJECTS)
.PHONY: install
install:
@test -d $(INSTALL_BIN) || mkdir -p $(INSTALL_BIN)
@install -m 0755 $(ODIR)/$(NAME) $(INSTALL_BIN)/
@test -d $(INSTALL_INC) || mkdir -p $(INSTALL_INC)
@cp -r ./src/*.h $(INSTALL_INC)/
.PHONY: clean
clean:
$(RM) $(ODIR)/$(NAME) $(OBJECTS)