-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
38 lines (31 loc) · 828 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
36
37
38
####################################
# Automatically generated by SMake #
# https://github.com/kala13x/smake #
####################################
CFLAGS = -g -O2 -Wall
CFLAGS += -I./src -I./xutils/build/include
LD_LIBS = ./xutils/build/lib/libxutils.a
LIBS = -lpthread
NAME = smake
ODIR = ./obj
OBJ = o
OBJS = cfg.$(OBJ) \
find.$(OBJ) \
info.$(OBJ) \
make.$(OBJ) \
smake.$(OBJ)
OBJECTS = $(patsubst %,$(ODIR)/%,$(OBJS))
INSTALL_BIN = /usr/bin
VPATH = ./src
.c.$(OBJ):
@test -d $(ODIR) || mkdir -p $(ODIR)
$(CC) $(CFLAGS) -c -o $(ODIR)/$@ $< $(LIBS)
$(NAME):$(OBJS)
$(CC) $(CFLAGS) -o $(ODIR)/$(NAME) $(OBJECTS) $(LD_LIBS) $(LIBS)
.PHONY: install
install:
@test -d $(INSTALL_BIN) || mkdir -p $(INSTALL_BIN)
install -m 0755 $(ODIR)/$(NAME) $(INSTALL_BIN)/
.PHONY: clean
clean:
$(RM) $(ODIR)/$(NAME) $(OBJECTS)