1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 17:37:57 +01:00

Add OS-X binary components. Install binaries add-on on 'make install'.

This commit is contained in:
Kris Maglione
2011-09-23 19:24:56 -04:00
parent 39ceae4f92
commit 0aa21f15c1
4 changed files with 53 additions and 29 deletions

View File

@@ -1,8 +1,14 @@
interfaces components/dactylIUtils.xpt
binary-component components/6.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 appversion>=6.0 appversion<6.*
binary-component components/7.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 appversion>=7.0 appversion<7.*
binary-component components/8.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 platformversion>=8.0 platformversion<8.*
binary-component components/9.0-Linux_x86_64-gcc3/dactyl.so abi=Linux_x86_64-gcc3 platformversion>=9.0 platformversion<9.*
binary-component components/6.0-Darwin_x86_64-gcc3/dactyl.so abi=Darwin_x86_64-gcc3 appversion>=6.0 appversion<6.*
binary-component components/7.0-Darwin_x86_64-gcc3/dactyl.so abi=Darwin_x86_64-gcc3 appversion>=7.0 appversion<7.*
binary-component components/8.0-Darwin_x86_64-gcc3/dactyl.so abi=Darwin_x86_64-gcc3 platformversion>=8.0 platformversion<8.*
binary-component components/9.0-Darwin_x86_64-gcc3/dactyl.so abi=Darwin_x86_64-gcc3 platformversion>=9.0 platformversion<9.*
# vim:se tw=0 ft=cfg:

View File

@@ -1,13 +1,16 @@
GECKO_MAJOR ?= 9
GECKO_MINOR ?= 0
ABI_OS ?= Linux
ABI_ARCH ?= x86_64
ABI_COMPILER ?= gcc3
ABI_OS := $(shell uname -s)
ABI_ARCH := $(shell uname -m)
ABI_COMPILER := gcc3
ABI ?= $(GECKO_MAJOR).$(GECKO_MINOR)-$(ABI_OS)_$(ABI_ARCH)-$(ABI_COMPILER)
DEFINES = -DGECKO_MAJOR=$(GECKO_MAJOR) -DGECKO_MINOR=$(GECKO_MINOR)
DEFINES = -DGECKO_MAJOR=$(GECKO_MAJOR) -DGECKO_MINOR=$(GECKO_MINOR)
SED := $(shell if [ "xoo" = x$$(echo foo | sed -E 's/f(o)/\1/' 2>/dev/null) ]; \
then echo sed -E; else echo sed -r; \
fi)
SED ?= sed -r
GECKO_SDK_PATH := $(shell pkg-config --libs libxul | $(SED) 's,([^-]|-[^L])*-L([^ ]+)/lib.*,\2,')

View File

@@ -29,12 +29,15 @@ GECKO_INCLUDES = -I$(ABI)/ \
GECKO_LDFLAGS = -L$(GECKO_SDK_PATH)/bin \
-L$(GECKO_SDK_PATH)/lib \
-lxpcomglue_s \
-lxpcom \
-lnspr4 \
-lplds4 \
-lxul \
-shared \
$(NULL)
ifeq "$(shell uname -s)" "Darwin"
GECKO_LDFLAGS += -undefined dynamic_lookup
endif
include $(ROOT)/config.mk
sinclude $(ROOT)/config.local.mk
@@ -42,8 +45,25 @@ XPTS = $(XPIDLSRCS:%.idl=$(XPTDIR)%.xpt)
OBJS = $(CPPSRCS:%.cpp=$(OBJDIR)%.o)
HEADERS = $(XPIDLSRCS:%.idl=$(ABI)/%.h)
all: build
dirs: $(XPTDIR) $(SODIR) $(OBJDIR)
depend: .depend
module: dirs $(MODULE).so
dll: dirs $(MODULE).dll
xpts: $(XPTS)
build: dirs module xpts
clean:
rm $(MODULE).so
$(OBJS): $(HEADERS)
$(ABI)/%.h: %.idl
@@ -52,8 +72,6 @@ $(ABI)/%.h: %.idl
$(XPTDIR)%.xpt: %.idl
$(IDL_XPT) $@ $(GECKO_INCLUDES) $<
depend: .depend
_CPPFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(DEFINES)
$(OBJDIR)%.o: %.cpp Makefile
@@ -63,23 +81,14 @@ $(OBJDIR)%.o: %.cpp Makefile
$(MKDEP) $(_CPPFLAGS) $(CPPSRCS) | $(SED) 's;^[^ ];$(OBJDIR)&;' >.depend
$(MODULE).so: $(OBJS)
$(CXX) -o $@ -Wl,-soname=$(MODULE).so $(OBJS) $(GECKO_LDFLAGS)
$(CXX) -o $@ $(OBJS) $(LDFLAGS) $(GECKO_LDFLAGS)
chmod +x $@
dirs: $(XPTDIR) $(SODIR) $(OBJDIR)
$(MODULE).dll: $(OBJS)
$(CXX) -o $@ $(OBJS) $(GECKO_LDFLAGS)
$(XPTDIR) $(SODIR) $(OBJDIR):
mkdir -p $@
module: dirs $(MODULE).so
xpts: $(XPTS)
build: dirs module xpts
clean:
rm $(MODULE).so
.PHONY: module xpts build clean all depend
sinclude .depend

View File

@@ -142,14 +142,20 @@ install:
exit 1; \
fi; \
\
ext="$$profile/extensions/$(UUID)"; \
mkdir -p "$$(dirname "$$ext")"; \
rm -rf "$$ext.xpi" "$$ext"; \
echo "Installing to $$ext"; \
if which cygpath >/dev/null 2>&1; \
then cygpath -wa .; \
else pwd; \
fi >"$$ext"
install() { \
ext="$$profile/extensions/$$2"; \
mkdir -p "$$(dirname "$$ext")"; \
rm -rf "$$ext.xpi" "$$ext"; \
\
echo "Installing $$2 to $$ext"; \
if which cygpath >/dev/null 2>&1; \
then cygpath -wa $$1; \
else (cd $$1; pwd); \
fi >"$$ext"; \
}; \
install . $(UUID); \
install ../binary binary@dactyl.googlecode.com; \
installxpi: xpi
$(HOSTAPP) $(XPI)