mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add -rpath to linker flags pointing to install directory
This removes the need to have the intermediate shell script that updates the LD_LIBRARY_PATH environment variable
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
INSTALLDIR=/usr/share/atom
|
||||
|
||||
CXXFLAGS := -Werror \
|
||||
-pthread \
|
||||
-fno-exceptions \
|
||||
@@ -36,6 +38,7 @@ LDFLAGS := -pthread \
|
||||
-Wl,-O1 \
|
||||
-Wl,--as-needed \
|
||||
-Wl,--gc-sections \
|
||||
-Wl,-rpath=$(INSTALLDIR)
|
||||
|
||||
LIBS := -lX11 \
|
||||
-lgtk-x11-2.0 \
|
||||
@@ -61,24 +64,23 @@ LIBS := -lX11 \
|
||||
|
||||
SOURCES=atom.cpp native_handler.cpp client_handler.cpp onig_regexp_extension.cpp io_utils.cpp
|
||||
OBJECTS=$(SOURCES:.cpp=.o)
|
||||
INSTALLDIR=/usr/local/atom
|
||||
|
||||
all:
|
||||
g++ $(CXXFLAGS) -c $(SOURCES)
|
||||
mkdir -p bin
|
||||
cp chrome.pak bin/
|
||||
cp -R locales bin/
|
||||
cp atom.png bin/
|
||||
g++ -o bin/atom $(OBJECTS) $(LDFLAGS) $(LIBS)
|
||||
g++ -o atom $(OBJECTS) $(LDFLAGS) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -rf bin *.o
|
||||
rm -rf atom *.o
|
||||
|
||||
install:
|
||||
mkdir -p $(INSTALLDIR)
|
||||
cp -R bin $(INSTALLDIR)
|
||||
cp -R lib $(INSTALLDIR)
|
||||
cp atom $(INSTALLDIR)
|
||||
cp -R atom $(INSTALLDIR)
|
||||
cp chrome.pak $(INSTALLDIR)
|
||||
cp -R locales $(INSTALLDIR)
|
||||
cp atom.png $(INSTALLDIR)
|
||||
cp lib/libcef.so $(INSTALLDIR)
|
||||
cp lib/libcef_dll_wrapper.a $(INSTALLDIR)
|
||||
cp -R ../src $(INSTALLDIR)
|
||||
cp -R ../static $(INSTALLDIR)
|
||||
cp -R ../vendor $(INSTALLDIR)
|
||||
|
||||
Reference in New Issue
Block a user