Кваку пока отложим ...
Возьмём ещё проще - тут , надеюсь , сразу разберёмся .
Ошибка такая :
Посмотрев в гугле , я понял , что это из-за неправильных путей в make к библиотекам sdl , сам не разобрался , так как там много папок с названием sdl ... Какие пути нужно прописать ?
В этих строках исправлять ?
#SDL_INC_DIR = /prog/SDL-1.2.5/include
#SDL_LIB_DIR = /lib/mingw
SDL_MIXER_DIR = /prog/dc/SDL_mixer-1.2.4
Код:
# KOS STUFF
EXTRALDFLAGS = -lz -lm
KOS_BASE=/prog/dc/KOS-1.1.9
SDL_INC_DIR = $(KOS_BASE)/include/SDL
SDL_LIB_DIR = $(KOS_BASE)/lib
SDL_MIXER_DIR = /prog/dc/SDL_mixer-1.2.4
SDL_CFLAGS := -I$(SDL_INC_DIR) -I$(SDL_MIXER_DIR)
SDL_LDFLAGS := -L$(SDL_LIB_DIR) -L$(SDL_MIXER_DIR)
# Global KallistiOS Makefile include
KOS_ALL_INCS := -I$(KOS_INCS) -I$(KOS_BASE)/libc/include \
-I$(KOS_BASE)/kernel/arch/$(KOS_ARCH)/include
ifndef KOS_LIBS
KOS_LIBS := -lkallisti -lgcc
KOS_LDFLAGS := $(KOS_LDFLAGS) -L$(KOS_BASE)/lib
endif
KOS_ARCH_DIR = $(KOS_BASE)/kernel/arch/$(KOS_ARCH)
KOS_START = $(KOS_ARCH_DIR)/kernel/startup.o
CFLAGS=-I dc/include -DDC
#-----------------------------------------------------------------------------#
# Duke3D makefile.
#-----------------------------------------------------------------------------#
beos := false
#use_asm := true
use_asm := false;
#-----------------------------------------------------------------------------#
# If this makefile fails to detect Cygwin correctly, or you want to force
# the build process's behaviour, set it to "true" or "false" (w/o quotes).
#-----------------------------------------------------------------------------#
cygwin := true
#cygwin := false
#cygwin := autodetect
# you only need to set these for Cygwin at the moment.
#SDL_INC_DIR = /prog/SDL-1.2.5/include
#SDL_LIB_DIR = /lib/mingw
# need this for now.
ifeq ($(strip $(beos)),true)
use_asm := false
endif
# Don't touch anything below this line unless you know what you're doing.
ifeq ($(strip $(cygwin)),autodetect)
ifneq ($(strip $(shell gcc -v 2>&1 |grep "cygwin")),)
cygwin := true
else
cygwin := false
endif
endif
ifeq ($(strip $(cygwin)),true)
ifeq ($(strip $(SDL_INC_DIR)),please_set_me_cygwin_users)
$(error Cygwin users need to set the SDL_INC_DIR envr var.)
else
SDL_CFLAGS := -I$(SDL_INC_DIR)
endif
ifeq ($(strip $(SDL_LIB_DIR)),please_set_me_cygwin_users)
$(error Cygwin users need to set the SDL_LIB_DIR envr var.)
else
SDL_LDFLAGS := -L$(SDL_LIB_DIR) -lSDL
endif
else
SDL_CFLAGS := $(shell sdl-config --cflags)
SDL_LDFLAGS := $(shell sdl-config --libs)
EXTRACFLAGS += -DUSE_EXECINFO=1
endif
# check out buildengine in this directory:
# cvs -z3 -d:pserver:anonymous@cvs.icculus.org:/cvs/cvsroot login
# (password is "anonymous", without the quotes.)
# cvs -z3 -d:pserver:anonymous@cvs.icculus.org:/cvs/cvsroot co buildengine
# cd buildengine
# make
# cd ..
# This sucks. We'll figure out something better.
BUILDOBJS := \
buildengine/cache1d.o \
buildengine/engine.o \
buildengine/sdl_driver.o \
buildengine/mmulti.o \
buildengine/pragmas.o \
buildengine/unix_compat.o
ifeq ($(strip $(use_asm)),true)
BUILDOBJS += buildengine/a_gnu.o buildengine/a_nasm.o
else
BUILDOBJS += buildengine/a.o
endif
CC = sh-elf-gcc -ml -m4-single-only
CFLAGS += -g $(SDL_CFLAGS) -DUSE_SDL=1 -DPLATFORM_UNIX=1 -W -Wall -Wno-unused $(EXTRACFLAGS) -O2 -funsigned-char -fomit-frame-pointer -DBYTE_ORDER=LITTLE_ENDIAN
# Uncomment this to compile with the Intel compiler (v6.0)
#CC = icc
#CFLAGS = -g $(SDL_CFLAGS) -DUSE_SDL=1 -DPLATFORM_UNIX=1 -DUSE_I386_ASM=1 $(EXTRACFLAGS) -O2
LDLIBS = $(SDL_LDFLAGS) -lSDL_mixer -lSDL $(EXTRALDFLAGS) -Wl,-E
all: duke3d
audiolib/audiolib.a:
$(MAKE) -C audiolib CC="$(CC)" CFLAGS="$(CFLAGS)" LDLIBS="$(LDLIBS)"
OBJS= \
actors.o \
animlib.o \
control.o \
config.o \
game.o \
gamedef.o \
global.o \
keyboard.o \
menues.o \
player.o \
premap.o \
rts.o \
scriplib.o \
sector.o \
sounds.o \
dukemusc.o \
audiolib/audiolib.a \
dc/unistd.o \
dc/memcpy.o \
dc/memset.o \
dc/menu.o \
dc/gzsave.o \
dc/vmuheader.o \
# dc/mm.o
duke3d: $(OBJS)
$(CC)$(KOS_LDFLAGS) $(KOS_START) $^ $(BUILDOBJS) $(LDLIBS) $(KOS_LIBS) -o $@
clean:
$(MAKE) -C audiolib clean
rm -rf duke3d *.o
distclean: clean
$(MAKE) -C audiolib distclean
rm -rf *~