GP32 Libmikmod


Drag

Member
Joined
Jan 11, 2004
Messages
371
Age
35
Location
USA
Website
drag.wootest.net
I don't know how everyone gets it, but I need libmikmod because of its xm and it support. For the life of me, I can't figure out how to compile it into a library. I have the source to mikplay, but that has code for the fxe program, of which I don't need. I just need the part of the library that has the player, loader, output, blah blah blah.

Can anyone help me?

I should upload the completed library here or something so people like me won't have to go through this every time.

And please don't tell me to convert my files to mod, I'm using the XM/IT commands and stuff, of which MOD doesn't support, so converting to mod is out of the question entirely.
 
I am alos after exactly the same thing! I have the source, but have no idea how to start modifying ot for GP32. I can probably mod the loading functions, but the output is beyond me.

I support draqs request. If anyone has mikmod that supports XM playing on GP32, I would be happy!
 
Hey pea, you can find a gp32 output driver thingy included in the source of MikPlay32.

Source is in this dir listing

With this source, it looks like it's just a matter of removing the fxe source, and compiling just the mikmod portion... since it looks like it's probably set up to compile the gp32 modded portion.

(also my name's not Draq, it's Drag with a g. :p)
 
No problem. :) It looks that way to me too in firebird and IE.

MikMod supports a surprisingly large amount of modules, so if this were to be compiled and actually work, that'd be great for anyone who wants any kind of module at all in their program. :D (converting an .it to a .mod is a real drag... x_x)
 
Yeah, I have always wanted XM support - and also support for more of the channel effects too (only the simplest are supported by Mr.Mirkos MOD player). Will have to benchmark somehow and see which ones are best on CPU load etc. I'll have a look at the code and let you know how I get on :)
 
I tried to make a simple app and include the mikmod.h header file. That gave me heaps of warnings about previously declared functions etc. I took this queue from the gpmain.c file that is in the gp32 directory. It seems its using the official SDK.

If I remove the following two includes from the mikmod.h file:

#include <stdio.h>
#include <stdlib.h>

Then it seems to compile ok. However, this is only compiling my app, and not any part of MikMod. How do I compile mikMod with a devkitARM makefile?

So far my makefile looks like this:
Code:
# This Makefile is very easy to use !
# Only edit PRG and OBJS 
# Dont touch anything else

CC = arm-elf-gcc
LD = arm-elf-gcc
AS = arm-elf-as
AR = arm-elf-ar

NAME = XMtest
AUTHOR = Pea
PRG  = xmtest
OBJS = xmtest.o

LIBS      = -L../../lib -lmirkoSDK -lm
CRT0      = ../../lib/crt0.S
LNKSCRIPT = ../../lib/lnkscript
INCLUDES  = -I../../lib.src/include
CFLAGS    = $(INCLUDES) -O2 -s -mtune=arm9tdmi

all:	$(OBJS)
	$(CC) -c -o crt0.o $(CRT0)
	$(LD) -nostartfiles -s -Wall -Wl,-Map,Test.map  -T $(LNKSCRIPT) crt0.o -o $(PRG).elf $(OBJS) $(LIBS)
	arm-elf-objcopy -O binary $(PRG).elf $(PRG).bin
	b2fxec -a $(AUTHOR) -t $(NAME) $(PRG).bin $(PRG).fxe

Below is the makefile (have no idea for which compiler) for MikMOD. How do I start to make this compatible with the version above? I have no idea what the @something@ means. If someone is able 'translate' just one of the dependencies, I can do the rest. I don't care about 'uninstal', 'clean', 'check' etc etc:

Code:
exec_prefix=@exec_prefix@
prefix=@prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..

VPATH = @srcdir@

DLOBJS=@DLOBJS@
LIBOBJS=@LIBOBJS@
LIBRARY_LIB=@LIBRARY_LIB@

CC=@CC@
INSTALL=@INSTALL@
LIBTOOL=@LIBTOOL@
MKINSTALLDIRS=${top_srcdir}/mkinstalldirs

DEFS=@DEFS@
CFLAGS=@CFLAGS@ -Dunix
COMPILE=$(LIBTOOL) --silent --mode=compile $(CC) $(DEFS) $(CFLAGS) -I$(top_srcdir)/include -I$(top_builddir) -I$(top_builddir)/include -DMIKMOD_H=$(top_srcdir)/include/mikmod.h

LIB = libmikmod.la
OBJ = $(LIBOBJS) $(DLOBJS) \
      drv_AF.lo drv_aix.lo drv_alsa.lo drv_esd.lo drv_hp.lo drv_nos.lo \
      drv_oss.lo drv_pipe.lo drv_raw.lo drv_sam9407.lo drv_sgi.lo \
      drv_stdout.lo drv_sun.lo drv_ultra.lo drv_wav.lo \
      load_669.lo load_amf.lo load_dsm.lo load_far.lo load_gdm.lo load_it.lo  \
      load_imf.lo load_m15.lo load_med.lo load_mod.lo load_mtm.lo load_okt.lo \
      load_s3m.lo load_stm.lo load_stx.lo load_ult.lo load_uni.lo load_xm.lo \
      mmalloc.lo mmerror.lo mmio.lo \
      mdriver.lo mdreg.lo mdulaw.lo mloader.lo mlreg.lo mlutil.lo mplayer.lo \
      munitrk.lo mwav.lo npertab.lo sloader.lo virtch.lo virtch2.lo \
      virtch_common.lo

DIST_FILES = $(top_srcdir)/libmikmod/Makefile.in

all:  $(LIB)

install:	$(LIB)
	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
	$(LIBTOOL) --mode=install $(INSTALL) -m 644 $(LIB) $(DESTDIR)$(libdir)

uninstall:	$(LIB)
	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIB)

check:  FORCE
	echo "Of course it works ! (-:"

clean:  FORCE
	rm -fR .libs $(LIB) $(OBJ)

distdir:
	(for file in $(DIST_FILES);                                               \
	do                                                                        \
  cp -f $$file $(distdir) && chmod 644 $$file;                          \
	done)

distclean:	clean
	rm -f Makefile

$(LIB): $(OBJ)
	$(LIBTOOL) --mode=link $(CC) -version-info 2:4:0 -o $@ $(OBJ) $(LIBRARY_LIB) -rpath $(DESTDIR)$(libdir)

dl_hpux.lo:	$(top_srcdir)/dlapi/dl_hpux.c \
  	$(top_srcdir)/dlapi/dlfcn.h
	$(COMPILE) -c $(top_srcdir)/dlapi/dl_hpux.c

drv_AF.lo:	$(top_srcdir)/drivers/drv_AF.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_AF.c
drv_aix.lo:	$(top_srcdir)/drivers/drv_aix.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_aix.c
drv_alsa.lo:	$(top_srcdir)/drivers/drv_alsa.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_alsa.c
drv_esd.lo:	$(top_srcdir)/drivers/drv_esd.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_esd.c
drv_hp.lo:	$(top_srcdir)/drivers/drv_hp.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_hp.c
drv_nos.lo:	$(top_srcdir)/drivers/drv_nos.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_nos.c
drv_pipe.lo:	$(top_srcdir)/drivers/drv_pipe.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_pipe.c
drv_oss.lo:	$(top_srcdir)/drivers/drv_oss.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_oss.c
drv_raw.lo:	$(top_srcdir)/drivers/drv_raw.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_raw.c
drv_sam9407.lo:	$(top_srcdir)/drivers/drv_sam9407.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_sam9407.c
drv_sgi.lo:	$(top_srcdir)/drivers/drv_sgi.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_sgi.c
drv_stdout.lo:	$(top_srcdir)/drivers/drv_stdout.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_stdout.c
drv_sun.lo:	$(top_srcdir)/drivers/drv_sun.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_sun.c
drv_ultra.lo:	$(top_srcdir)/drivers/drv_ultra.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_ultra.c
drv_wav.lo:	$(top_srcdir)/drivers/drv_wav.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/drivers/drv_wav.c

load_669.lo:	$(top_srcdir)/loaders/load_669.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_669.c
load_amf.lo:	$(top_srcdir)/loaders/load_amf.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_amf.c
load_dsm.lo:	$(top_srcdir)/loaders/load_dsm.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_dsm.c
load_far.lo:	$(top_srcdir)/loaders/load_far.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_far.c
load_gdm.lo:	$(top_srcdir)/loaders/load_gdm.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_gdm.c
load_it.lo:	$(top_srcdir)/loaders/load_it.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_it.c
load_imf.lo:	$(top_srcdir)/loaders/load_imf.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_imf.c
load_m15.lo:	$(top_srcdir)/loaders/load_m15.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_m15.c
load_med.lo:	$(top_srcdir)/loaders/load_med.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_med.c
load_mod.lo:	$(top_srcdir)/loaders/load_mod.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_mod.c
load_mtm.lo:	$(top_srcdir)/loaders/load_mtm.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_mtm.c
load_okt.lo:	$(top_srcdir)/loaders/load_okt.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_okt.c
load_s3m.lo:	$(top_srcdir)/loaders/load_s3m.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_s3m.c
load_stm.lo:	$(top_srcdir)/loaders/load_stm.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_stm.c
load_stx.lo:	$(top_srcdir)/loaders/load_stx.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_stx.c
load_ult.lo:	$(top_srcdir)/loaders/load_ult.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_ult.c
load_uni.lo:	$(top_srcdir)/loaders/load_uni.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_uni.c
load_xm.lo:	$(top_srcdir)/loaders/load_xm.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/loaders/load_xm.c

mmalloc.lo:	$(top_srcdir)/mmio/mmalloc.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/mmio/mmalloc.c
mmerror.lo:	$(top_srcdir)/mmio/mmerror.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/mmio/mmerror.c
mmio.lo:  $(top_srcdir)/mmio/mmio.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/mmio/mmio.c

mdriver.lo:	$(top_srcdir)/playercode/mdriver.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mdriver.c
mdreg.lo:	$(top_srcdir)/playercode/mdreg.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mdreg.c
mdulaw.lo:	$(top_srcdir)/playercode/mdulaw.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mdulaw.c
mloader.lo:	$(top_srcdir)/playercode/mloader.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mloader.c
mlreg.lo:	$(top_srcdir)/playercode/mlreg.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mlreg.c
mlutil.lo:	$(top_srcdir)/playercode/mlutil.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mlutil.c
mplayer.lo:	$(top_srcdir)/playercode/mplayer.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mplayer.c
munitrk.lo:	$(top_srcdir)/playercode/munitrk.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/munitrk.c
mwav.lo:  $(top_srcdir)/playercode/mwav.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/mwav.c
npertab.lo:	$(top_srcdir)/playercode/npertab.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/npertab.c
sloader.lo:	$(top_srcdir)/playercode/sloader.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/sloader.c
virtch.lo:	$(top_srcdir)/playercode/virtch.c $(top_srcdir)/playercode/virtch_common.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/virtch.c
virtch2.lo:	$(top_srcdir)/playercode/virtch2.c $(top_srcdir)/playercode/virtch_common.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/virtch2.c
virtch_common.lo:	$(top_srcdir)/playercode/virtch_common.c \
  	$(top_builddir)/include/mikmod.h $(top_srcdir)/include/mikmod_internals.h
	$(COMPILE) -c $(top_srcdir)/playercode/virtch_common.c

strcasecmp.lo:	$(top_srcdir)/posix/strcasecmp.c
	$(COMPILE) -c $(top_srcdir)/posix/strcasecmp.c
strdup.lo:	$(top_srcdir)/posix/strdup.c
	$(COMPILE) -c $(top_srcdir)/posix/strdup.c
strstr.lo:	$(top_srcdir)/posix/strstr.c
	$(COMPILE) -c $(top_srcdir)/posix/strstr.c


FORCE:
 
Ok, here is my first attempt. This is based on the original libMikMOD makefile, but I tried to copy one of Mr.Mirkos makefiles for his SDK source:

Code:
CC = arm-elf-gcc
LD = arm-elf-gcc
AS = arm-elf-as
AR = arm-elf-ar


INCLUDES = -I../../lib.src/include

CFLAGS = $(INCLUDES) -O2 -s -DLITTLE_ENDIAN -DGP32 -mtune=arm9tdmi 
 
OBJS =$(LIBOBJS) $(DLOBJS) \
      drv_AF.o drv_aix.o drv_alsa.o drv_esd.o drv_hp.o drv_nos.o \
      drv_oss.o drv_pipe.o drv_raw.o drv_sam9407.o drv_sgi.o \
      drv_stdout.o drv_sun.o drv_ultra.o drv_wav.o \
      load_669.o load_amf.o load_dsm.o load_far.o load_gdm.o load_it.o  \
      load_imf.o load_m15.o load_med.o load_mod.o load_mtm.o load_okt.o \
      load_s3m.o load_stm.o load_stx.o load_ult.o load_uni.o load_xm.o \
      mmalloc.o mmerror.o mmio.o \
      mdriver.o mdreg.o mdulaw.o mloader.o mlreg.o mlutil.o mplayer.o \
      munitrk.o mwav.o npertab.o sloader.o virtch.o virtch2.o \
      virtch_common.o

all: libmikmod.a

libmikmod.a: $(OBJS)
	$(AR) rcs $@ $(OBJS)

dl_hpux.o:	dlapi/dl_hpux.c \
  	/dlapi/dlfcn.h
	$(CC) -c dlapi/dl_hpux.c
drv_AF.o:	drivers/drv_AF.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_AF.c
drv_aix.o:	drivers/drv_aix.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_aix.c
drv_alsa.o:	drivers/drv_alsa.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_alsa.c
drv_esd.o:	drivers/drv_esd.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_esd.c
drv_hp.o:	drivers/drv_hp.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_hp.c
drv_nos.o:	drivers/drv_nos.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_nos.c
drv_pipe.o:	drivers/drv_pipe.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_pipe.c
drv_oss.o:	drivers/drv_oss.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_oss.c
drv_raw.o:	drivers/drv_raw.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_raw.c
drv_sam9407.o:	drivers/drv_sam9407.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_sam9407.c
drv_sgi.o:	drivers/drv_sgi.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_sgi.c
drv_stdout.o:	drivers/drv_stdout.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_stdout.c
drv_sun.o:	drivers/drv_sun.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_sun.c
drv_ultra.o:	drivers/drv_ultra.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_ultra.c
drv_wav.o:	drivers/drv_wav.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c drivers/drv_wav.c

load_669.o:	loaders/load_669.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_669.c
load_amf.o:	loaders/load_amf.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_amf.c
load_dsm.o:	loaders/load_dsm.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_dsm.c
load_far.o:	loaders/load_far.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_far.c
load_gdm.o:	loaders/load_gdm.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_gdm.c
load_it.o:	loaders/load_it.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_it.c
load_imf.o:	loaders/load_imf.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_imf.c
load_m15.o:	loaders/load_m15.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_m15.c
load_med.o:	loaders/load_med.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_med.c
load_mod.o:	loaders/load_mod.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_mod.c
load_mtm.o:	loaders/load_mtm.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_mtm.c
load_okt.o:	loaders/load_okt.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_okt.c
load_s3m.o:	loaders/load_s3m.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_s3m.c
load_stm.o:	loaders/load_stm.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_stm.c
load_stx.o:	loaders/load_stx.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_stx.c
load_ult.o:	loaders/load_ult.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_ult.c
load_uni.o:	loaders/load_uni.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_uni.c
load_xm.o:	loaders/load_xm.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c loaders/load_xm.c

mmalloc.o:	mmio/mmalloc.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c mmio/mmalloc.c
mmerror.o:	mmio/mmerror.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c mmio/mmerror.c
mmio.o:  mmio/mmio.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c mmio/mmio.c

mdriver.o:	playercode/mdriver.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/mdriver.c
mdreg.o:	playercode/mdreg.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/mdreg.c
mdulaw.o:	playercode/mdulaw.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/mdulaw.c
mloader.o:	playercode/mloader.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/mloader.c
mlreg.o:	playercode/mlreg.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/mlreg.c
mlutil.o:	playercode/mlutil.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/mlutil.c
mplayer.o:	playercode/mplayer.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/mplayer.c
munitrk.o:	playercode/munitrk.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/munitrk.c
mwav.o:  playercode/mwav.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/mwav.c
npertab.o:	playercode/npertab.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/npertab.c
sloader.o:	playercode/sloader.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/sloader.c
virtch.o:	playercode/virtch.c playercode/virtch_common.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/virtch.c
virtch2.o:	playercode/virtch2.c playercode/virtch_common.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/virtch2.c
virtch_common.o:	playercode/virtch_common.c \
  	include/mikmod.h include/mikmod_internals.h
	$(CC) -c playercode/virtch_common.c

strcasecmp.o:	posix/strcasecmp.c
	$(CC) -c posix/strcasecmp.c
strdup.o:	posix/strdup.c
	$(CC) -c posix/strdup.c
strstr.o:	posix/strstr.c
	$(CC) -c posix/strstr.c

I get an error:
c:\gp32_MrMirko\bin\make: *** No rule to make target `include/mikmod.h', needed by `drv_AF.o'. Stop.

How do I make a rule for mikmod.h?
 
Err sorry to bother everybody with a good fat newb question, but :

LIBS = -L../../lib -lmirkoSDK -lm

I wonder how you declare an external library for gcc, that can be recognizable this way ?

Is it possible to use Linux gcc ?

Thanks for your patience :)
 
Pea, have you tried -I ing the directories that have the files that are #included? (for each individual call to CC that is. :p)

-I (uppercase i) is supposed to tell the compiler where to look for #included files.
 
I imagine you'd have to -I each one of the dirs. I don't know for sure though, as I'm very inexperienced with makefiles.

Just try with the drv_AF line, and when the compiler manages to compile that correctly, apply what you did to the rest.
 
ok, modified it like this:

Code:
drv_AF.o:	drivers/drv_AF.c
	$(CC) -Igp32 -Iinclude -c drivers/drv_AF.c

And this starts to work, but comes up with a whole bunch of undefined types, including:
size_t
FILE
etc...

How do I get the makefile to use Mr. Mirkos SDK (or any other SDK for that matter). I guess quite similar to demorias question.

I believe that these types are all defined in Mr.Mirkos lib (in a file called lib.src/includes/cpp_prototypes.h) but how do I tell makefile to use these types?
 
I think there's a possibility that those types were defined in stdlib.h.

The only thing I can think of to do is #include <cpp_prototypes.h> in the mikmod.h file.


-l specifies a precompiled library to be linked with your program when it's made. It behaves a bit oddly though, because from what these docs tell me, it looks like -lBlah will match with libBlahHorray.a. Dunno though.

I forget what -L (uppercase l) does...
 
Had one of my include paths wrong. All those types exist now..
I have a great deal of it compiling. Here is the progress so far:

Code:
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_AF.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_aix.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_alsa.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_esd.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_hp.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_nos.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_oss.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_pipe.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_raw.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_sam9407.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_sgi.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_stdout.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_sun.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_ultra.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_wav.c
In file included from drivers/drv_wav.c:39:
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:50: error: conflicting types for 'GPFILE'
../lib.src/include/fileio.h:27: error: previous declaration of 'GPFILE' was here

In file included from drivers/drv_wav.c:39:
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:172: error: conflicting types for 'smc_fclose'
../lib.src/include/cpp_prototypes.h:95: error: previous declaration of 'smc_fclo
se' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:172: error: conflicting types for 'smc_fclose'
../lib.src/include/cpp_prototypes.h:95: error: previous declaration of 'smc_fclo
se' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:196: error: conflicting types for 'smc_fread'
../lib.src/include/cpp_prototypes.h:93: error: previous declaration of 'smc_frea
d' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:196: error: conflicting types for 'smc_fread'
../lib.src/include/cpp_prototypes.h:93: error: previous declaration of 'smc_frea
d' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:197: error: conflicting types for 'smc_fwrite'
../lib.src/include/cpp_prototypes.h:94: error: previous declaration of 'smc_fwri
te' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:197: error: conflicting types for 'smc_fwrite'
../lib.src/include/cpp_prototypes.h:94: error: previous declaration of 'smc_fwri
te' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:203: error: conflicting types for 'smc_fseek'
../lib.src/include/cpp_prototypes.h:96: error: previous declaration of 'smc_fsee
k' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:203: error: conflicting types for 'smc_fseek'
../lib.src/include/cpp_prototypes.h:96: error: previous declaration of 'smc_fsee
k' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:209: error: conflicting types for 'smc_ftell'
../lib.src/include/cpp_prototypes.h:97: error: previous declaration of 'smc_ftel
l' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:209: error: conflicting types for 'smc_ftell'
../lib.src/include/cpp_prototypes.h:97: error: previous declaration of 'smc_ftel
l' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:210: error: conflicting types for 'smc_rewind'
../lib.src/include/cpp_prototypes.h:98: error: previous declaration of 'smc_rewi
nd' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:210: error: conflicting types for 'smc_rewind'
../lib.src/include/cpp_prototypes.h:98: error: previous declaration of 'smc_rewi
nd' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:216: error: conflicting types for 'smc_fopen'
../lib.src/include/cpp_prototypes.h:92: error: previous declaration of 'smc_fope
n' was here
/cygdrive/c/gp32_MrMirko/bin/../lib/gcc/arm-elf/3.4.0/../../../../arm-elf/includ
e/stdio.h:216: error: conflicting types for 'smc_fopen'
../lib.src/include/cpp_prototypes.h:92: error: previous declaration of 'smc_fope
n' was here
c:\gp32_MrMirko\bin\make: *** [drv_wav.o] Error 1

Press any key to continue . . .
 
Now replace #include for stdio with Mr. Mirkos fileio.h, and much better:

Code:
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_AF.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_aix.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_alsa.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_esd.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_hp.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_nos.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_oss.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_pipe.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_raw.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_sam9407.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_sgi.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_stdout.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_sun.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_ultra.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c drivers/drv_wav.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_669.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_amf.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_dsm.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_far.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_gdm.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_it.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_imf.c
loaders/load_imf.c: In function `IMF_Load':
loaders/load_imf.c:615: warning: assignment makes pointer from integer without a
 cast
loaders/load_imf.c:620: warning: assignment makes pointer from integer without a
 cast
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_m15.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_med.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_mod.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_mtm.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_okt.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_s3m.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_stm.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_stx.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_ult.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_uni.c
loaders/load_uni.c: In function `loadinstr5':
loaders/load_uni.c:418: warning: assignment makes pointer from integer without a
 cast
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c loaders/load_xm.c
loaders/load_xm.c: In function `LoadInstruments':
loaders/load_xm.c:576: warning: assignment makes pointer from integer without a
cast
loaders/load_xm.c:581: warning: assignment makes pointer from integer without a
cast
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c mmio/mmalloc.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c mmio/mmerror.c
arm-elf-gcc -I../lib.src/include -Igp32 -Iinclude -c mmio/mmio.c
mmio/mmio.c: In function `_mm_FileReader_Eof':
mmio/mmio.c:129: error: structure has no member named `_flags'
mmio/mmio.c: In function `_mm_FileReader_Get':
mmio/mmio.c:139: warning: passing arg 1 of `fgetc' from incompatible pointer typ
e
mmio/mmio.c: In function `_mm_delete_file_reader':
mmio/mmio.c:169: error: `gp_mem_func' undeclared (first use in this function)
mmio/mmio.c:169: error: (Each undeclared identifier is reported only once
mmio/mmio.c:169: error: for each function it appears in.)
mmio/mmio.c: In function `_mm_FileWriter_Put':
mmio/mmio.c:196: warning: passing arg 2 of `fputc' from incompatible pointer typ
e
mmio/mmio.c: In function `_mm_delete_file_writer':
mmio/mmio.c:214: error: `gp_mem_func' undeclared (first use in this function)
c:\gp32_MrMirko\bin\make: *** [mmio.o] Error 1

Press any key to continue . . .

Should be soon :)
 
BTW Blah
Go here http://ajo.thinknerd.com/gp32/mkplay32/lib...10-gp32-src.zip (Libmikmod version 3.1.10 gp32 source). This is the one used in Mikplay32. Although thats probably not the issue. I would try to compile with gamepark sdk as a start.
See original post - this is the version we are using.

I don't actually have the official SDK on my computer. I have never used it, and don't intend to :)
 
And... replaced a couple of memory handling functions written for official SDK (gp_mem_func.DMALLOC or some crazy thing) to just use malloc for Mr. Mirko SDK.... still working on it...

EDIT:
\/\/00T - I have libmikmod.a (450kb file) with a bit of chopping up code. There were three files rewritten by the GP32 authors to work with the offcial SDK. I mucked around with them to get them to compile, but I am going to have to rewrite them for use with Mr. Mirkos SDK.

Mr. Mirko - If you are reading this, are your fileio functions directly replaceable with those in the official SDK? e.g. GpFileSeek, GpFileRead, GpFileOpen etc? The reason I ask is because the main problem I had was that these functions use certain constants that don't seem to be defined in your SDK, including FROM_BEGIN, ERR_EOF and EOF. I still haven't found the real value for EOF either...
 
Thank goodness! :D

I would never have been able to compile that.

I think it should be uploaded to gp32x.de once it's done and working properly, so no one has to go through this compile mess again.

If file size becomes an issue, you could probably leave out the other drivers, other than drv_gp32. That'd probably require taking out some things in the source though.

Thank you for compiling! :)
 
Back
Top