summaryrefslogtreecommitdiff
path: root/binary/src
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-09-23 19:24:56 -0400
committerKris Maglione <maglione.k@gmail.com>2011-09-23 19:24:56 -0400
commit0aa21f15c1e17f71c8424e30d6414969b08ab1aa (patch)
treeefce5d951f8cc81948eee953df53abb6f27d8890 /binary/src
parent39ceae4f92487dc0052ace15fc1132e7465ce045 (diff)
downloadpentadactyl-0aa21f15c1e17f71c8424e30d6414969b08ab1aa.tar.gz
Add OS-X binary components. Install binaries add-on on 'make install'.
Diffstat (limited to 'binary/src')
-rw-r--r--binary/src/Makefile41
1 files changed, 25 insertions, 16 deletions
diff --git a/binary/src/Makefile b/binary/src/Makefile
index e40136a7..960fbaad 100644
--- a/binary/src/Makefile
+++ b/binary/src/Makefile
@@ -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