Skip to content

Commit dfa7c0b

Browse files
committed
Move FLAGS from BuildLinux() to Makefile.gnu
1 parent 0ec0548 commit dfa7c0b

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Makefile.gnu

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ AR = ar
77
GTK3_INCLUDE = -I/usr/include/gtk-3.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/harfbuzz
88
GTK3_LIBRARIES = -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
99

10-
CXXFLAGS += -O2 -g -fpermissive -Wno-deprecated-declarations $(GTK3_INCLUDE) $(P4PLUGIN_INCLUDE)
11-
LDFLAGS += -g
12-
LIBRARIES = -lstdc++ -lrt $(GTK3_LIBRARIES)
10+
CFLAGS += -O3 -g -fPIC -fexceptions -fvisibility=hidden -DLINUX
11+
CXXFLAGS += $(CFLAGS) -fpermissive -Wno-deprecated-declarations $(GTK3_INCLUDE) $(P4PLUGIN_INCLUDE)
12+
LDFLAGS += -g -pthread
13+
LIBRARIES += -lstdc++ -lrt $(GTK3_LIBRARIES)
1314
PLATFORM = linux64
1415

1516
COMMON_MODULES = $(COMMON_SRCS:.c=.o)
@@ -22,7 +23,7 @@ TESTSERVER_TARGET= Build/$(PLATFORM)/TestServer
2223
P4PLUGIN_MODULES = $(P4PLUGIN_SRCS:.c=.o)
2324
P4PLUGIN_MODULES := $(P4PLUGIN_MODULES:.cpp=.o)
2425
P4PLUGIN_TARGET = PerforcePlugin
25-
P4PLUGIN_LINK += $(LIBRARIES) -ldl -fPIC -no-pie
26+
P4PLUGIN_LINK += $(LIBRARIES) -ldl -no-pie
2627

2728
default: all
2829

build.pl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,6 @@ sub TestWin32
161161

162162
sub BuildLinux ($)
163163
{
164-
my $cflags = '-O3 -fPIC -fexceptions -fvisibility=hidden -DLINUX';
165-
my $cxxflags = "$cflags -Wno-ctor-dtor-private";
166-
167-
$ENV{'CFLAGS'} = $cflags;
168-
$ENV{'CXXFLAGS'} = $cxxflags;
169-
170164
system ('make', '-f', 'Makefile.gnu', 'clean');
171165
system ('make', '-f', 'Makefile.gnu') && die ("Failed to build PerforcePlugin for linux64");
172166
}

0 commit comments

Comments
 (0)