-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
94 lines (70 loc) · 2.51 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#------------------------------------------------------------------------------#
# This makefile was generated by 'cbp2make' tool rev.135 #
#------------------------------------------------------------------------------#
WORKDIR = `pwd`
CC = gcc
CXX = g++
AR = ar
LD = g++
WINDRES = windres
INC1 = -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/libpurple
INC = $(INC1) -I/usr/local/lib/glib-2.0/include -I/usr/local/include/glib-2.0 -I/usr/local/include/libpurple
CFLAGS = -Wall -fPIC
RESINC =
LIBDIR =
LIB =
LDFLAGS = -lg15daemon_client
INC_DEBUG = $(INC)
CFLAGS_DEBUG = $(CFLAGS) -g
RESINC_DEBUG = $(RESINC)
RCFLAGS_DEBUG = $(RCFLAGS)
LIBDIR_DEBUG = $(LIBDIR)
LIB_DEBUG = $(LIB)
LDFLAGS_DEBUG = $(LDFLAGS)
OBJDIR_DEBUG = obj
DEP_DEBUG =
OUTDIR_DEBUG = bin
OUT_DEBUG = $(OUTDIR_DEBUG)/g15purple.so
INC_RELEASE = $(INC)
CFLAGS_RELEASE = $(CFLAGS) -O2
RESINC_RELEASE = $(RESINC)
RCFLAGS_RELEASE = $(RCFLAGS)
LIBDIR_RELEASE = $(LIBDIR)
LIB_RELEASE = $(LIB)
LDFLAGS_RELEASE = $(LDFLAGS) -s
OBJDIR_RELEASE = obj
DEP_RELEASE =
OUTDIR_RELEASE = bin
OUT_RELEASE = $(OUTDIR_DEBUG)/g15purple.so
OBJ_DEBUG = $(OBJDIR_DEBUG)/src/g15purple.o
OBJ_RELEASE = $(OBJDIR_RELEASE)/src/g15purple.o
#all: debug release
all: release
clean: clean_debug clean_release
before_debug:
test -d $(OUTDIR_DEBUG) || mkdir -p $(OUTDIR_DEBUG)
test -d $(OBJDIR_DEBUG)/src || mkdir -p $(OBJDIR_DEBUG)/src
after_debug:
debug: before_debug out_debug after_debug
out_debug: $(OBJ_DEBUG) $(DEP_DEBUG)
$(LD) -shared $(LDFLAGS_DEBUG) $(LIBDIR_DEBUG) $(OBJ_DEBUG) $(LIB_DEBUG) -o $(OUT_DEBUG)
$(OBJDIR_DEBUG)/src/g15purple.o: src/g15purple.c
$(CC) $(CFLAGS_DEBUG) $(INC_DEBUG) -c src/g15purple.c -o $(OBJDIR_DEBUG)/src/g15purple.o
clean_debug:
rm -f $(OBJ_DEBUG) $(OUT_DEBUG)
rm -rf $(OUTDIR_DEBUG)
rm -rf $(OBJDIR_DEBUG)/src
before_release:
test -d $(OUTDIR_RELEASE) || mkdir -p $(OUTDIR_RELEASE)
test -d $(OBJDIR_RELEASE)/src || mkdir -p $(OBJDIR_RELEASE)/src
after_release:
release: before_release out_release after_release
out_release: $(OBJ_RELEASE) $(DEP_RELEASE)
$(LD) -shared $(LDFLAGS_RELEASE) $(LIBDIR_RELEASE) $(OBJ_RELEASE) $(LIB_RELEASE) -o $(OUT_RELEASE)
$(OBJDIR_RELEASE)/src/g15purple.o: src/g15purple.c
$(CC) $(CFLAGS_RELEASE) $(INC_RELEASE) -c src/g15purple.c -o $(OBJDIR_RELEASE)/src/g15purple.o
clean_release:
rm -f $(OBJ_RELEASE) $(OUT_RELEASE)
rm -rf $(OUTDIR_RELEASE)
rm -rf $(OBJDIR_RELEASE)/src
.PHONY: before_debug after_debug clean_debug before_release after_release clean_release