Skip to content

Commit

Permalink
Build hdhomerun_config utility as mythhdhomerun_config
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Thor Kristjansson <danielk@cuymedia.net>
  • Loading branch information
garybuhrmaster authored and daniel-kristjansson committed Dec 14, 2012
1 parent 3c788be commit 2c48b07
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 23 deletions.
3 changes: 2 additions & 1 deletion mythtv/configure
Expand Up @@ -5538,7 +5538,8 @@ echo "Configuring qjson..."
if ! disabled hdhomerun ; then
echo "Configuring libhdhomerun..."
(cd external/libhdhomerun; \
${qmake} -o Makefile)
${qmake} -o Makefile.lib CONFIG+=Makefile.lib; \
${qmake} -o Makefile.app CONFIG+=Makefile.app)
fi

test -n "$WARNINGS" && printf "\n$WARNINGS" || exit 0
Expand Down
3 changes: 2 additions & 1 deletion mythtv/external/Makefile
Expand Up @@ -51,5 +51,6 @@ qjson-install qjson-uninstall qjson-clean qjson-distclean:
${MAKE} -C qjson ${@:qjson-%=%}

libhdhomerun-all libhdhomerun-clean libhdhomerun-distclean libhdhomerun-install libhdhomerun-uninstall:
${MAKE} -C libhdhomerun ${@:libhdhomerun-%=%}
${MAKE} -C libhdhomerun -f Makefile.lib ${@:libhdhomerun-%=%}
${MAKE} -C libhdhomerun -f Makefile.app ${@:libhdhomerun-%=%}

2 changes: 2 additions & 0 deletions mythtv/external/libhdhomerun/.gitignore
@@ -1,2 +1,4 @@
Makefile
Makefile.app
Makefile.lib
hdhomerun_config
76 changes: 55 additions & 21 deletions mythtv/external/libhdhomerun/libhdhomerun.pro
@@ -1,16 +1,7 @@
include ( ../../settings.pro )

TEMPLATE = lib
TARGET = mythhdhomerun
CONFIG += thread dll plugin
CONFIG -= qt
target.path = $${LIBDIR}
INSTALLS = target

QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2)

HEADERS += hdhomerun.h hdhomerun_os.h hdhomerun_sock.h hdhomerun_types.h

HEADERS += hdhomerun_channels.h hdhomerun_channelscan.h hdhomerun_control.h
HEADERS += hdhomerun_debug.h hdhomerun_device.h hdhomerun_device_selector.h
HEADERS += hdhomerun_discover.h hdhomerun_pkt.h hdhomerun_video.h
Expand All @@ -20,29 +11,72 @@ SOURCES += hdhomerun_debug.c hdhomerun_device.c hdhomerun_device_selec
SOURCES += hdhomerun_discover.c hdhomerun_pkt.c hdhomerun_video.c

unix {

HEADERS += hdhomerun_os_posix.h
SOURCES += hdhomerun_os_posix.c hdhomerun_sock_posix.c
LIBS += -lpthread

!macx {
LIBS += -lrt
}

}

mingw {

HEADERS += hdhomerun_os_windows.h
SOURCES += hdhomerun_os_windows.c hdhomerun_sock_windows.c
SOURCES -= hdhomerun_os_posix.c
LIBS += -lws2_32 -liphlpapi
LIBS += $$EXTRALIBS

# Qt under Linux/UnixMac OS X builds libBlah.a and libBlah.so,
# but is using the Windows defaults libBlah.a and Blah.dll.
#
# So that our dependency targets work between SUBDIRS, override:
#
TARGET = lib$${TARGET}

# Windows doesnt have a nice variable like LD_LIBRARY_PATH,
# which means make install would be broken without extra steps.
# As a workaround, we store dlls with exes. Also improves debugging!
#
target.path = $${PREFIX}/bin
}

Makefile.lib {

TEMPLATE = lib
TARGET = mythhdhomerun
CONFIG += thread dll plugin
CONFIG -= qt
target.path = $${LIBDIR}
INSTALLS = target

QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2)


mingw {

# Qt under Linux/UnixMac OS X builds libBlah.a and libBlah.so,
# but is using the Windows defaults libBlah.a and Blah.dll.
#
# So that our dependency targets work between SUBDIRS, override:
#
TARGET = lib$${TARGET}

# Windows doesnt have a nice variable like LD_LIBRARY_PATH,
# which means make install would be broken without extra steps.
# As a workaround, we store dlls with exes. Also improves debugging!
#
target.path = $${PREFIX}/bin

}

}

Makefile.app {

TERMPLATE = app
TARGET = mythhdhomerun_config
CONFIG += thread
CONFIG -= qt
target.path = $${PREFIX}/bin
INSTALLS = target

QMAKE_CLEAN += $(TARGET)

unix:QMAKE_POST_LINK=strip $(TARGET)

SOURCES += hdhomerun_config.c

}

0 comments on commit 2c48b07

Please sign in to comment.