projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed obsolete targets and statements from Makefiles
[rocksndiamonds.git]
/
src
/
Makefile
diff --git
a/src/Makefile
b/src/Makefile
index 0f98d356035c7cb823d146003df6ddd29906c9bc..da479a447fabfb9b51eac29568089292ee5817eb 100644
(file)
--- a/
src/Makefile
+++ b/
src/Makefile
@@
-19,6
+19,15
@@
ifndef PLATFORM # unknown platform -- default to Unix
PLATFORM = unix
endif
PLATFORM = unix
endif
+PLATFORM_BASE = $(PLATFORM)
+
+ifeq ($(PLATFORM),cross-win32)
+PLATFORM_BASE = cross-win
+endif
+ifeq ($(PLATFORM),cross-win64)
+PLATFORM_BASE = cross-win
+endif
+
AR = ar
RANLIB = ranlib
ETAGS = etags
AR = ar
RANLIB = ranlib
ETAGS = etags
@@
-39,16
+48,11
@@
EDITION ?= default
# configuring platform
# -----------------------------------------------------------------------------
# configuring platform
# -----------------------------------------------------------------------------
-ifeq ($(PLATFORM),macosx) # compiling on Mac OS X
-EXTRA_LDFLAGS = -lstdc++
-override PLATFORM = unix
-endif
-
ifeq ($(PLATFORM),unix) # compiling on Unix/Linux (generic)
PROFILING_FLAGS = -pg
endif
ifeq ($(PLATFORM),unix) # compiling on Unix/Linux (generic)
PROFILING_FLAGS = -pg
endif
-ifeq ($(PLATFORM
),cross-win32)
# cross-compiling to Windows
+ifeq ($(PLATFORM
_BASE),cross-win)
# cross-compiling to Windows
PROGNAME = ../$(PROGBASE).exe
EXTRA_LDFLAGS = -lshfolder -lwsock32
endif
PROGNAME = ../$(PROGBASE).exe
EXTRA_LDFLAGS = -lshfolder -lwsock32
endif
@@
-58,28
+62,17
@@
endif
# configuring target
# -----------------------------------------------------------------------------
# configuring target
# -----------------------------------------------------------------------------
-ifndef TARGET # auto-detect compiling for SDL
or SDL
2
+ifndef TARGET # auto-detect compiling for SDL2
SDL_VERSION := $(shell sdl2-config --version 2> /dev/null)
ifdef SDL_VERSION
TARGET = sdl2
else
SDL_VERSION := $(shell sdl2-config --version 2> /dev/null)
ifdef SDL_VERSION
TARGET = sdl2
else
- SDL_VERSION := $(shell sdl-config --version 2> /dev/null)
- ifdef SDL_VERSION
- TARGET = sdl
- else
- $(error SDL/SDL2 library not found)
- endif
+ $(error SDL2 library not found)
endif
endif
# $(info Using SDL version $(SDL_VERSION) [TARGET == $(TARGET)])
endif
endif
# $(info Using SDL version $(SDL_VERSION) [TARGET == $(TARGET)])
-ifeq ($(TARGET),sdl) # compiling for SDL target
-SYS_CFLAGS = -DTARGET_SDL $(shell sdl-config --cflags)
-SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net
-SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --libs)
-endif
-
ifeq ($(TARGET),sdl2) # compiling for SDL2 target
SYS_CFLAGS = -DTARGET_SDL2 $(shell sdl2-config --cflags)
SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net
ifeq ($(TARGET),sdl2) # compiling for SDL2 target
SYS_CFLAGS = -DTARGET_SDL2 $(shell sdl2-config --cflags)
SDL_LIBS = -lSDL2_image -lSDL2_mixer -lSDL2_net
@@
-121,7
+114,7
@@
OPTIONS = -O3 -Wall
endif
CFLAGS = $(OPTIONS) $(SYS_CFLAGS) $(EXTRA_CFLAGS) $(CONFIG)
endif
CFLAGS = $(OPTIONS) $(SYS_CFLAGS) $(EXTRA_CFLAGS) $(CONFIG)
-LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm
+LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm
-lz
SRCS = main.c \
SRCS = main.c \
@@
-207,7
+200,7
@@
AUTOCONF = conf_gfx.h conf_snd.h conf_mus.h
ICONBASE = windows_icon
ICON_BASEPATH = ../Special/Icons/windows_icons
ICONBASE = windows_icon
ICON_BASEPATH = ../Special/Icons/windows_icons
-ifeq ($(PLATFORM
),cross-win32
)
+ifeq ($(PLATFORM
_BASE),cross-win
)
ICON_PATH = $(ICON_BASEPATH)/$(EDITION)
ICON = $(ICONBASE).o
endif
ICON_PATH = $(ICON_BASEPATH)/$(EDITION)
ICON = $(ICONBASE).o
endif