From 908227c5e29647e6231b6195f18f5a00412c38b2 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 21 May 2006 16:43:43 +0000 Subject: [PATCH] New make system, compatible with both mvp and win --- Makefile => GNUmakefile | 22 ++++++--------------- Makefile.nmake | 43 +++++++++++++++++++++++++++++++++++++++++ objects.mk | 13 +++++++++++++ 3 files changed, 62 insertions(+), 16 deletions(-) rename Makefile => GNUmakefile (52%) create mode 100644 Makefile.nmake create mode 100644 objects.mk diff --git a/Makefile b/GNUmakefile similarity index 52% rename from Makefile rename to GNUmakefile index 9ee421c..a4d8ad1 100644 --- a/Makefile +++ b/GNUmakefile @@ -11,21 +11,10 @@ LIBPATHS = LIBS = -lpthread -lrt CROSSLIBS = ../jpeg-6b/libjpeg.a -OBJECTS1 = main.o command.o log.o tcp.o dsock.o thread.o timers.o i18n.o \ - message.o messagequeue.o \ - vdr.o recman.o recording.o channel.o rectimer.o event.o directory.o \ - player.o vfeed.o afeed.o \ - demuxer.o demuxervdr.o stream.o draintarget.o \ - viewman.o box.o region.o colour.o view.o \ - vinfo.o vwallpaper.o vvolume.o vrecordinglist.o vlivebanner.o vmute.o \ - vtimerlist.o vtimeredit.o voptionsmenu.o vrecordingmenu.o vquestion.o \ - vchannellist.o vwelcome.o vvideolive.o vvideorec.o vepgsettimer.o \ - vchannelselect.o vserverselect.o vconnect.o voptions.o vepg.o vrecmove.o \ - widget.o wselectlist.o wjpeg.o wsymbol.o wbutton.o woptionbox.o wtextbox.o \ - fonts/helvB24.o fonts/helvB18.o \ - remote.o led.o mtd.o video.o audio.o osd.o surface.o - -OBJECTSMVP = threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o +# This is the only thing windows and linux share +include objects.mk + +OBJECTSMVP = main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o OBJECTS = $(OBJECTS1) $(OBJECTSMVP) @@ -57,10 +46,11 @@ dev: vompclient release: CXXFLAGS := $(CXXFLAGS_REL) release: clean vompclient strip -deps: Makefile +deps: GNUmakefile $(CC) -MM $(INCLUDES) $(OBJECTS:%.o=%.cc) > deps -include deps clean: rm -f *.o deps vompclient *~ fonts/*.o fonts/*~ + diff --git a/Makefile.nmake b/Makefile.nmake new file mode 100644 index 0000000..fad4573 --- /dev/null +++ b/Makefile.nmake @@ -0,0 +1,43 @@ +CXXFLAGS_DEV = -g -O0 -Wall -Woverloaded-virtual -Wshadow -Werror -DDEV -D_GNU_SOURCE $(INCLUDES) +CXXFLAGS_REL = /I"$(DXSDK_DIR)\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "NEW_DEMUXER" /nologo /EHsc /MD /GS /W3 /c /TP +LDFLAGS = /INCREMENTAL:NO /NOLOGO /NODEFAULTLIB /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LIBPATH:"$(DXSDK_DIR)\Lib\x86" + + + + +LIBS = Msvcrt.lib Ws2_32.lib shlwapi.lib d3d9.lib d3dx9.lib Iphlpapi.lib strmbase.lib Strmiids.lib winmm.lib MSVCPRT.lib atls.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib +CROSSLIBS = + +!include "objects.mk" + + +OBJECTSWIN = winmain.o threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o dsallocator.o dssourcefilter.o dssourcepin.o + +OBJECTS = $(OBJECTS1) $(OBJECTSWIN) + +#.PHONY: clean fresh all install strip + +default: release #dev + +release:: +CXXFLAGS= $(CXXFLAGS_REL) +release:: vompclient.exe + + + +vompclient.exe: $(OBJECTS) vompwin.res + link $(LDFLAGS) /OUT:"vompclient.exe" $(LIBS) $(OBJECTS) vompwin.res + + + +$(OBJECTS): $*.cc + $(CXX) $(CXXFLAGS) /Fo$*.o $*.cc + +vompwin.res:vompwin.rc + $(RC) /fo"vompwin.res" "vompwin.rc" + +clean: + del *.o + del vompclient.exe + del fonts\*.o + diff --git a/objects.mk b/objects.mk new file mode 100644 index 0000000..b51cde8 --- /dev/null +++ b/objects.mk @@ -0,0 +1,13 @@ +OBJECTS1 = command.o log.o tcp.o dsock.o thread.o timers.o i18n.o \ + message.o messagequeue.o \ + vdr.o recman.o recording.o channel.o rectimer.o event.o directory.o \ + player.o vfeed.o afeed.o \ + demuxer.o demuxervdr.o stream.o draintarget.o \ + viewman.o box.o region.o colour.o view.o \ + vinfo.o vwallpaper.o vvolume.o vrecordinglist.o vlivebanner.o vmute.o \ + vtimerlist.o vtimeredit.o voptionsmenu.o vrecordingmenu.o vquestion.o \ + vchannellist.o vwelcome.o vvideolive.o vvideorec.o vepgsettimer.o \ + vchannelselect.o vserverselect.o vconnect.o voptions.o vepg.o vrecmove.o \ + widget.o wselectlist.o wjpeg.o wsymbol.o wbutton.o woptionbox.o wtextbox.o \ + fonts/helvB24.o fonts/helvB18.o \ + remote.o led.o mtd.o video.o audio.o osd.o surface.o -- 2.39.5