mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Add initial gyp-based linux build
This commit is contained in:
1
Atom-Linux/.gitignore
vendored
1
Atom-Linux/.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
/atom
|
||||
*.o
|
||||
*~
|
||||
out/
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
INSTALLDIR=/usr/share/atom
|
||||
|
||||
CXXFLAGS := -Werror \
|
||||
-pthread \
|
||||
-fno-exceptions \
|
||||
-fno-strict-aliasing \
|
||||
-Wall \
|
||||
-Wno-unused-parameter \
|
||||
-Wno-missing-field-initializers \
|
||||
-fvisibility=hidden \
|
||||
-pipe \
|
||||
-fPIC \
|
||||
-pthread \
|
||||
-D_REENTRANT \
|
||||
-I/usr/include/glib-2.0 \
|
||||
-I/usr/lib/i386-linux-gnu/glib-2.0/include \
|
||||
-I/usr/include/gtk-2.0 \
|
||||
-I/usr/lib/i386-linux-gnu/gtk-2.0/include \
|
||||
-I/usr/include/atk-1.0 \
|
||||
-I/usr/include/cairo \
|
||||
-I/usr/include/gdk-pixbuf-2.0 \
|
||||
-I/usr/include/pango-1.0 \
|
||||
-I/usr/include/gio-unix-2.0/ \
|
||||
-I/usr/include/pixman-1 \
|
||||
-I/usr/include/freetype2 \
|
||||
-I/usr/include/libpng12 \
|
||||
-I/usr/include/openssl \
|
||||
-I../cef \
|
||||
-O2 \
|
||||
-fno-ident \
|
||||
-fdata-sections \
|
||||
-ffunction-sections \
|
||||
-fno-rtti \
|
||||
-fno-threadsafe-statics \
|
||||
-fvisibility-inlines-hidden \
|
||||
-Wsign-compare
|
||||
|
||||
LDFLAGS := -pthread \
|
||||
-Wl,-z,noexecstack \
|
||||
-fPIC \
|
||||
-Llib \
|
||||
-Wl,-O1 \
|
||||
-Wl,--as-needed \
|
||||
-Wl,--gc-sections \
|
||||
-Wl,-rpath=$(INSTALLDIR)
|
||||
|
||||
LIBS := -lX11 \
|
||||
-lgtk-x11-2.0 \
|
||||
-lgdk-x11-2.0 \
|
||||
-latk-1.0 \
|
||||
-lgio-2.0 \
|
||||
-lpangoft2-1.0 \
|
||||
-lgdk_pixbuf-2.0 \
|
||||
-lm \
|
||||
-lpangocairo-1.0 \
|
||||
-lcairo \
|
||||
-lpango-1.0 \
|
||||
-lgobject-2.0 \
|
||||
-lgmodule-2.0 \
|
||||
-lgthread-2.0 \
|
||||
-lrt \
|
||||
-lglib-2.0 \
|
||||
-lssl \
|
||||
-lcrypto \
|
||||
-lcef \
|
||||
-lcef_dll_wrapper \
|
||||
-lonig
|
||||
|
||||
SOURCES=atom.cpp native_handler.cpp client_handler.cpp onig_regexp_extension.cpp io_utils.cpp
|
||||
OBJECTS=$(SOURCES:.cpp=.o)
|
||||
|
||||
all:
|
||||
g++ $(CXXFLAGS) -c $(SOURCES)
|
||||
g++ -o atom $(OBJECTS) $(LDFLAGS) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -rf atom *.o
|
||||
|
||||
install:
|
||||
mkdir -p $(INSTALLDIR)
|
||||
cp 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)
|
||||
cp -R ../bundles $(INSTALLDIR)
|
||||
cp -R ../themes $(INSTALLDIR)
|
||||
coffee -c -o $(INSTALLDIR)/src/stdlib ../src/stdlib/require.coffee
|
||||
ln -sf $(INSTALLDIR)/atom /usr/local/bin/atom
|
||||
|
||||
spec-install: install
|
||||
cp -R ../spec $(INSTALLDIR)
|
||||
40
Atom-Linux/atom.gyp
Normal file
40
Atom-Linux/atom.gyp
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'atom',
|
||||
'type': 'executable',
|
||||
'variables': {
|
||||
'pkg-config': 'pkg-config',
|
||||
},
|
||||
'dependencies': [
|
||||
],
|
||||
'defines': [
|
||||
],
|
||||
'include_dirs': [
|
||||
'../cef',
|
||||
],
|
||||
'sources': [
|
||||
'atom.cpp',
|
||||
'client_handler.cpp',
|
||||
'io_utils.cpp',
|
||||
'native_handler.cpp',
|
||||
'onig_regexp_extension.cpp',
|
||||
],
|
||||
'cflags': [
|
||||
'<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0 openssl)',
|
||||
],
|
||||
'link_settings': {
|
||||
'ldflags': [
|
||||
'<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0 openssl)',
|
||||
'-Llib',
|
||||
],
|
||||
'libraries': [
|
||||
'<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0 openssl)',
|
||||
'-lcef',
|
||||
'-lcef_dll_wrapper',
|
||||
'-lonig',
|
||||
],
|
||||
}
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user