-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (67 loc) · 1.93 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
#
# The PROGRAM macro defines the name of the program or project. It
# allows the program name to be changed by editing in only one
# location
#
PROGRAM = a13gui
#
# The INCLUDEDIRS macro contains a list of include directories
# to pass to the compiler so it can find necessary header files.
#
# The LIBDIRS macro contains a list of library directories
# to pass to the linker so it can find necessary libraries.
#
# The LIBS macro contains a list of libraries that the the
# executable must be linked against.
#
INCLUDEDIRS = \
-I/usr/X11R6/include \
$(shell pkg-config gtk+-2.0 --cflags)
LIBDIRS = \
-L/usr/lib64 \
-L/usr/X11R6/lib
LIBS = \
-lX11 -lXext -lm -lcurl\
$(shell pkg-config gtk+-2.0 --libs)
#
# The CXXSOURCES macro contains a list of source files.
#
# The CXXOBJECTS macro converts the CXXSOURCES macro into a list
# of object files.
#
# The CXXFLAGS macro contains a list of options to be passed to
# the compiler. Adding "-g" to this line will cause the compiler
# to add debugging information to the executable.
#
# The CXX macro defines the C++ compiler.
#
# The LDFLAGS macro contains all of the library and library
# directory information to be passed to the linker.
#
CXXSOURCES = a13gui.cpp
CXXOBJECTS = $(CXXSOURCES:.cpp=.o)
CXXFLAGS = -O3 -DESRI_UNIX $(INCLUDEDIRS)
CXX = g++
LDFLAGS = $(LIBDIRS) $(LIBS)
#
# Default target: the first target is the default target.
# Just type "make -f Makefile.LinuxGTK" to build it.
#
all: $(PROGRAM)
#
# Link target: automatically builds its object dependencies before
# executing its link command.
#
$(PROGRAM): $(CXXOBJECTS)
$(CXX) -o $@ $(CXXOBJECTS) $(LDFLAGS)
#
# Object targets: rules that define objects, their dependencies, and
# a list of commands for compilation.
#
a13gui.o: a13gui.cpp
$(CXX) $(CXXFLAGS) -c -o a13gui.o a13gui.cpp
#
# Clean target: "make -f Makefile.LinuxGTK clean" to remove unwanted objects and executables.
#
clean:
$(RM) -f $(CXXOBJECTS) $(PROGRAM)