-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.linux
executable file
·59 lines (41 loc) · 1.53 KB
/
Makefile.linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
###########################################
# Simple Makefile for Finch
# To run for your program, just change TARGET
#
# Tom Lauwers, [email protected]
###########################################
#TARGET=CommandLineFinch
#TARGET=MyProgramName
all: build
CC=gcc
CXX=g++
COBJS=./hid-libusb.o
CPPOBJS=./Finch.o $(TARGET)
#CPPOBJS=./Finch/Finch.o $(TARGET).o
OBJS=$(COBJS) $(CPPOBJS) build
CFLAGS=-I./hidapi -g
LIBS=`pkg-config libusb-1.0 --libs`
#Copypasta starts here
#CXX = c++
CPPFLAGS += -fno-rtti \
-fno-exceptions \
-shared
# Change this to point at your Gecko SDK directory.
GECKO_SDK_PATH = /usr/lib/xulrunner-devel-6.0/sdk
IDL_PATH = /usr/include/xulrunner-6.0
# 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
GECKO_DEFINES = -DXPCOM_GLUE_USE_NSPR
#GECKO_INCLUDES = -I $(GECKO_SDK_PATH)/include -I $(IDL_PATH)
GECKO_INCLUDES = -I /usr/include/xulrunner-6.0
GECKO_LDFLAGS = -L$(GECKO_SDK_PATH)/lib -L$(GECKO_SDK_PATH)/bin -Wl,-rpath-link,$(GECKO_SDK_PATH)/bin -lxpcomglue_s -lxpcom -lnspr4 -L./ -lhidapi -lhidap32
FILES = Finch.cpp FinchModule.cpp
TARGET = Finch.so
#build:
build:
$(CXX) -Os $(CFLAGS) -o $(TARGET) $(LIBS) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) -I./ $(CPPFLAGS) $(CXXFLAGS) $(FILES) $(GECKO_LDFLAGS)
# chmod +x $(TARGET)
# strip $(TARGET)
.PHONY: clean