-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (43 loc) · 1.33 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
WORKDIR = %cd%
CC = gcc
CXX = g++
AR = ar
LD = g++
WINDRES = windres
INC =
CFLAGS =
RESINC =
LIBDIR =
LIB =
LDFLAGS=
INC_RELEASE = $(INC)
CFLAGS_RELEASE = $(CFLAGS) -Wall -O2
RESINC_RELEASE = $(RESINC)
RCFLAGS_RELEASE = $(RCFLAGS)
LIBDIR_RELEASE = $(LIBDIR)
LIB_RELEASE = $(LIB)
LDFLAGS_RELEASE = $(LDFLAGS) -s
OBJDIR_RELEASE = bin
DEP_RELEASE =
OUT_RELEASE = lib/libzio-utils.a
SRC_RELEASE = src
OBJ_RELEASE = $(OBJDIR_RELEASE)/con_interaction.o $(OBJDIR_RELEASE)/reader.o $(OBJDIR_RELEASE)/list.o
all: release
clean: clean_release
before_release:
mkdir -p $(OBJDIR_RELEASE)
mkdir -p lib
after_release:
release: before_release out_release after_release
out_release: before_release $(OBJ_RELEASE) $(DEP_RELEASE)
$(AR) rcs $(OUT_RELEASE) $(OBJ_RELEASE)
$(OBJDIR_RELEASE)/con_interaction.o: $(SRC_RELEASE)/con_interaction.c
$(CC) $(CFLAGS_RELEASE) $(INC_RELEASE) -c $(SRC_RELEASE)/con_interaction.c -o $(OBJDIR_RELEASE)/con_interaction.o
$(OBJDIR_RELEASE)/reader.o: $(SRC_RELEASE)/reader.c
$(CC) $(CFLAGS_RELEASE) $(INC_RELEASE) -c $(SRC_RELEASE)/reader.c -o $(OBJDIR_RELEASE)/reader.o
$(OBJDIR_RELEASE)/list.o: $(SRC_RELEASE)/list.c
$(CC) $(CFLAGS_RELEASE) $(INC_RELEASE) -c $(SRC_RELEASE)/list.c -o $(OBJDIR_RELEASE)/list.o
clean_release:
rm -rf $(OBJDIR_RELEASE)
rm -rf lib
.PHONY: before_release after_release clean_release