CXX = c++ CPPFLAGS += -fno-rtti \ -fno-exceptions \ -shared # CASA includes CASA_INCLUDE_PATH = ../../../CASA/include # Change this to point at your Gecko SDK directory. GECKO_LIB_PATH = /usr/lib/xulrunner-1.8.0.1 GECKO_INCLUDE_PATH = /usr/include/xulrunner-1.8.0.1 MOZILLA_NSPR4_DEVEL = /usr/include/nspr4 # GCC only define which allows us to not have to #include mozilla-config # in every .cpp file. If your not using GCC remove this line and add # #include "mozilla-config.h" to each of your .cpp files. GECKO_CONFIG_INCLUDE = -include mozilla-config.h #MOZILLA_STRICT_API is needed for gecko-sdk 1.7 or earlier #GECKO_DEFINES = -DMOZILLA_STRICT_API GECKO_DEFINES = CASA_INCLUDE = -I $(CASA_INCLUDE_PATH) XPCOM_INCLUDES = -I $(GECKO_INCLUDE_PATH) -I $(MOZILLA_NSPR4_DEVEL) GECKO_LDFLAGS = -L $(GECKO_LIB_PATH) \ -lxpcom \ -lnspr4 \ -lplds4 FILES = MiCASAKeys.cpp MiCASAKeysModule.cpp TARGET = MiCASAKeys.so build: $(CXX) -Wall -Os -o $(TARGET) $(CASA_INCLUDE) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(XPCOM_INCLUDES) $(CPPFLAGS) $(CXXFLAGS) $(FILES) $(GECKO_LIB_PATH)/libxpcomglue_s.a $(GECKO_LDFLAGS) chmod +x $(TARGET) # strip $(TARGET) clean: rm $(TARGET)