LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-24-2009, 06:16 PM   #1
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Rep: Reputation: 33
windows gcc makefile


Hi gang,

I just download the source for dsmp darn small media player. But the guy develops it under windows. <spit> but says it will compile on any gcc compiler.

ERr how do I change the make file pls?

<code>
# Project: DSMP
# Compiler: Default GCC compiler
# Compiler Type: MingW 3
# Makefile created by wxDev-C++ 7.0 on 26-03-09 01:43

CPP = g++.exe
CC = gcc.exe
WINDRES = "windres.exe"
OBJ = Objects/MingW/SMPApp.o Objects/MingW/SMPDlg.o Objects/MingW/SMP_private.res
LINKOBJ = Objects/MingW/SMPApp.o Objects/MingW/SMPDlg.o Objects/MingW/SMP_private.res
LIBS = -L"C:/Program Files/Dev-Cpp/Lib" -lwxmsw28_treelistctrl -mwindows -lwxmsw28 -lwxmsw28_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32 -g3
INCS = -I"C:/Program Files/Dev-Cpp/Include"
CXXINCS = -I"C:/Program Files/Dev-Cpp/lib/gcc/mingw32/3.4.5/include" -I"C:/Program Files/Dev-Cpp/include/c++/3.4.5/backward" -I"C:/Program Files/Dev-Cpp/include/c++/3.4.5/mingw32" -I"C:/Program Files/Dev-Cpp/include/c++/3.4.5" -I"C:/Program Files/Dev-Cpp/include" -I"C:/Program Files/Dev-Cpp/" -I"C:/Program Files/Dev-Cpp/include/3rdparty/wx/plotctrl" -I"C:/Program Files/Dev-Cpp/include/3rdparty/wx/sheet" -I"C:/Program Files/Dev-Cpp/include/3rdparty/wx/treemultictrl" -I"C:/Program Files/Dev-Cpp/include/3rdparty/wx/things" -I"C:/Program Files/Dev-Cpp/include/3rdparty/wx" -I"C:/Program Files/Dev-Cpp/include/3rdparty" -I"C:/Program Files/Dev-Cpp/include/common/wx/msw" -I"C:/Program Files/Dev-Cpp/include/common/wx/generic" -I"C:/Program Files/Dev-Cpp/include/common/wx/fl" -I"C:/Program Files/Dev-Cpp/include/common/wx/gizmos" -I"C:/Program Files/Dev-Cpp/include/common/wx/html" -I"C:/Program Files/Dev-Cpp/include/common/wx/mmedia" -I"C:/Program Files/Dev-Cpp/include/common/wx/net" -I"C:/Program Files/Dev-Cpp/include/common/wx/ogl" -I"C:/Program Files/Dev-Cpp/include/common/wx/plot" -I"C:/Program Files/Dev-Cpp/include/common/wx/protocol" -I"C:/Program Files/Dev-Cpp/include/common/wx/stc" -I"C:/Program Files/Dev-Cpp/include/common/wx/svg" -I"C:/Program Files/Dev-Cpp/include/common/wx/xml" -I"C:/Program Files/Dev-Cpp/include/common/wx/xrc" -I"C:/Program Files/Dev-Cpp/include/common/wx" -I"C:/Program Files/Dev-Cpp/include/common"
RCINCS = --include-dir "C:/PROGRA~1/Dev-Cpp/include/common"
BIN = Output/MingW/DSMP.exe
DEFINES = -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__
CXXFLAGS = $(CXXINCS) $(DEFINES) -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -g3
CFLAGS = $(INCS) $(DEFINES) -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -g3
GPROF = gprof.exe
RM = rm -f
WXLIBNAME = wxmsw28
LINK = g++.exe

.PHONY: all all-before all-after clean clean-custom
all: all-before $(BIN) all-after

clean: clean-custom
$(RM) $(OBJ) $(BIN)

$(BIN): $(OBJ)
$(LINK) $(LINKOBJ) -o "Output\MingW\DSMP.exe" $(LIBS)

Objects/MingW/SMPApp.o: $(GLOBALDEPS) SMPApp.cpp SMPApp.h SMPDlg.h filelist.h
$(CPP) -c SMPApp.cpp -o Objects/MingW/SMPApp.o $(CXXFLAGS)

Objects/MingW/SMPDlg.o: $(GLOBALDEPS) SMPDlg.cpp SMPDlg.h filelist.h Images/Self_SMPDlg_XPM.xpm Images/SMPDlg_NextButton_XPM.xpm Images/SMPDlg_StopButton_XPM.xpm Images/SMPDlg_PlayButton_XPM.xpm Images/SMPDlg_PreviousButton_XPM.xpm Images/click_play.xpm Images/click_skip_backward.xpm Images/click_skip_forward.xpm Images/click_stop_playing.xpm Images/hover_play.xpm Images/hover_skip_backward.xpm Images/hover_skip_forward.xpm Images/hover_stop_playing.xpm Images/pause.xpm Images/click_pause.xpm Images/hover_pause.xpm
$(CPP) -c SMPDlg.cpp -o Objects/MingW/SMPDlg.o $(CXXFLAGS)

Objects/MingW/SMP_private.res: Objects/MingW/SMP_private.rc SMPApp.rc
$(WINDRES) --input-format=rc -o Objects/MingW/SMP_private.res $(RCINCS) Objects/MingW/SMP_PR~1.RC -O coff
</code>
 
Old 08-25-2009, 01:27 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Although the program is using the cross platform wxWidgets, it is also linking in a lot of mingw32/windows libraries (perhaps only for use by wxwindows). Mingw32 is a port of gcc which allows people to develop in a win32 api context, rather than a posix one, so it includes things like headers for the win32 api and so on. A particular problem here is the apparent use of Windows style resources.

So even if you rewrite the makefile so it works, you may still not be able to compile it under a Unix/Linux platform.

It may be that most of the code is easy to port, but you might want to check if the author has ever actually compiled it on a non-windows platform. If he has, ask for the makefile.

Last edited by neonsignal; 08-25-2009 at 01:28 AM.
 
Old 08-25-2009, 01:44 AM   #3
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
Quote:

It may be that most of the code is easy to port, but you might want to check if the author has ever actually compiled it on a non-windows platform. If he has, ask for the makefile.
good idea. After my first fag, i'll do that
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Makefile] passing parameters to gcc NightHorse Linux - Newbie 7 06-16-2009 06:23 AM
makefile problem with gcc bison/flex on ubuntu garvey Linux - Software 0 03-16-2009 04:31 PM
from windows to linux makefile answerme Programming 2 04-08-2008 05:16 AM
makefile gcc command cannot be found Mogul83 Programming 7 05-31-2005 03:11 AM
"perl Makefile.PL" complains about cc & gcc (self solved tip) Raptor Ramjet Slackware 2 09-13-2004 02:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration