Skip to content

Commit 6af6786

Browse files
committed
fix link options for --as-needed (#90)
also fix a couple of includes
1 parent 2100f14 commit 6af6786

File tree

11 files changed

+12
-10
lines changed

11 files changed

+12
-10
lines changed

common/include/app.mak

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ DEST_INST_DIR = $(ROOTDIR)$(INST_DIR)
1010
all: $(APP_NAME)
1111

1212
$(APP_NAME): $(OBJECTS)
13-
$(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LDLIBS)
13+
$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
1414

1515
install: $(APP_NAME)
1616
install -D $(APP_NAME) $(DEST_INST_DIR)/$(APP_NAME)

common/include/lib.mak.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ $(STATIC_LIB): $(OBJECTS)
2525
ar rcs $(STATIC_LIB) $(OBJECTS)
2626

2727
$(SHARED_LIB): $(OBJECTS)
28-
$(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) $(LDLIBS) \
29-
-o $(SHARED_LIB) $(OBJECTS)
28+
$(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) -o $(SHARED_LIB) \
29+
$(OBJECTS) $(LDLIBS)
3030

3131
install: install_header install_static install_shared
3232

common/include/plugin.mak

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ DEST_INST_DIR = $(INST_DIR)
1616
all: $(LIB_NAME)
1717

1818
$(LIB_NAME): $(OBJECTS)
19-
$(CC) -shared $(LDFLAGS) $(LDLIBS) -o $(LIB_NAME) $(OBJECTS)
19+
$(CC) -shared $(LDFLAGS) -o $(LIB_NAME) $(OBJECTS) $(LDLIBS)
2020

2121
install: $(LIB_NAME)
2222
install -D $(LIB_NAME) $(DEST_INST_DIR)/$(LIB_NAME)

lswm/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SOURCES = lswm.c
88

99
CFLAGS += -I@top_builddir@/libcwiid
1010
LDFLAGS += -L@top_builddir@/libcwiid
11-
LDLIBS += -lcwiid
11+
LDLIBS += -lcwiid -lbluetooth
1212
INST_DIR = @bindir@
1313

1414
include $(COMMON)/include/app.mak

python/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ifdef ROOTDIR
77
endif
88

99
all:
10-
$(PYTHON) setup.py build_ext $(DEBUGFLAGS) -I@top_builddir@/libcwiid -L@top_builddir@/libcwiid -lcwiid
10+
$(PYTHON) setup.py build_ext $(DEBUGFLAGS) -I@top_builddir@/libcwiid -L@top_builddir@/libcwiid -lcwiid -lbluetooth
1111

1212
install:
1313
$(PYTHON) setup.py install --install-lib=${libdir}/python@PYTHON_VERSION@/site-packages $(SET_ROOT_DIR)

python/Wiimote.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "structmember.h"
2525
#include <errno.h>
2626
#include <bluetooth/bluetooth.h>
27-
#include "cwiid.h"
27+
#include <cwiid.h>
2828

2929
#if (PY_VERSION_HEX < 0x02050000)
3030
#ifndef PY_SSIZE_T_MIN

python/cwiidmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include <stdlib.h>
2626

27-
#include "cwiid.h"
27+
#include <cwiid.h>
2828
#include "structmember.h"
2929

3030
/* externally defined types */

wmdemo/wmdemo.c

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <stdio.h>
33
#include <stdlib.h>
44

5+
#include <bluetooth/bluetooth.h>
56
#include <cwiid.h>
67

78
/* This is a sample program written to demonstrate basic CWiid libwiimote

wmgui/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SOURCES = main.c interface.c support.c
88

99
CFLAGS += @GTK_CFLAGS@ -I@top_builddir@/libcwiid
1010
LDFLAGS += -L@top_builddir@/libcwiid
11-
LDLIBS += @GTK_LIBS@ -lm -lcwiid
11+
LDLIBS += @GTK_LIBS@ -lcwiid -lbluetooth -lm
1212
INST_DIR = @bindir@
1313

1414
include $(COMMON)/include/app.mak

wminput/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CFLAGS += -I@top_builddir@/libcwiid \
1414
-DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" \
1515
-DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\"
1616

17-
LDLIBS += -lcwiid -ldl
17+
LDLIBS += -lcwiid -lbluetooth -ldl -lpthread
1818
LDFLAGS += -L@top_builddir@/libcwiid -rdynamic
1919
INST_DIR = @bindir@
2020

wminput/main.c

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <signal.h>
3131
#include <sys/types.h>
3232
#include <unistd.h>
33+
#include <bluetooth/bluetooth.h>
3334

3435
#include <cwiid.h>
3536

0 commit comments

Comments
 (0)