Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
2bec8a8c
Commit
2bec8a8c
authored
18 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Move SDL detection into xpdev Common.gmake.
parent
a168faa5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/conio/Common.gmake
+0
-50
0 additions, 50 deletions
src/conio/Common.gmake
src/xpdev/Common.gmake
+51
-0
51 additions, 0 deletions
src/xpdev/Common.gmake
with
51 additions
and
50 deletions
src/conio/Common.gmake
+
0
−
50
View file @
2bec8a8c
# Find SDL headers!
ifndef WITHOUT_SDL
ifndef SDL_CONFIG
ifeq ($(os),darwin)
ifeq ($(shell if [ -d /Library/Frameworks/SDL.framework ] ; then echo YES ; fi),YES)
WITH_SDL := 1
endif
else
ifeq ($(shell sdl-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl-config
WITH_SDL := 1
else
ifeq ($(shell sdl13-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl13-config
WITH_SDL := 1
else
ifeq ($(shell sdl12-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl12-config
WITH_SDL := 1
else
ifeq ($(shell sdl11-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl11-config
WITH_SDL := 1
endif
endif
endif
endif
endif
endif
endif
ifdef WITH_SDL
ifdef SDL_CONFIG
ifeq ($(shell ${SDL_CONFIG} --cflags > /dev/null 2>&1 && echo YES),YES)
CIOLIB-MT_CFLAGS += -DWITH_SDL
CIOLIB-MT_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
ifdef STATIC_SDL
CIOLIB-MT_LIBS += $(shell $(SDL_CONFIG) --static-libs)
CIOLIB-MT_CFLAGS += -DSTATIC_SDL
endif
endif
else
ifeq ($(os),darwin)
CIOLIB-MT_CFLAGS += -DWITH_SDL -DSTATIC_SDL
CIOLIB-MT_CFLAGS += -I/Library/Frameworks/SDL.framework/Headers
CIOLIB-MT_LIBS += -framework SDL -framework Cocoa -framework Carbon -I/Library/Frameworks/SDL.framework/Headers
endif
endif
endif
X_PATH ?= $(shell if [ -f /usr/X11R6/include/X11/Xlib.h ]; then echo /usr/X11R6 ; elif [ -f /usr/X11R7/include/X11/Xlib.h ] ; then echo /usr/X11R7 ; elif [ -f /usr/X11/include/X11/Xlib.h ] ; then echo /usr/X11 ; elif [ -f /usr/X/include/X11/Xlib.h ] ; then echo /usr/X ; elif [ -f /usr/include/X11/Xlib.h ] ; then echo /usr ; else echo 0 ; fi)
ifeq ($(os),sunos)
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/Common.gmake
+
51
−
0
View file @
2bec8a8c
...
...
@@ -67,3 +67,54 @@ ifeq ($(os),darwin)
XPDEV-MT_CFLAGS += -DHAS_RANDOM_FUNC
XPDEV_CFLAGS += -DHAS_RANDOM_FUNC
endif
# Find SDL headers!
ifndef WITHOUT_SDL
ifndef SDL_CONFIG
ifeq ($(os),darwin)
ifeq ($(shell if [ -d /Library/Frameworks/SDL.framework ] ; then echo YES ; fi),YES)
WITH_SDL := 1
endif
else
ifeq ($(shell sdl-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl-config
WITH_SDL := 1
else
ifeq ($(shell sdl13-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl13-config
WITH_SDL := 1
else
ifeq ($(shell sdl12-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl12-config
WITH_SDL := 1
else
ifeq ($(shell sdl11-config --cflags > /dev/null 2>&1 && echo YES),YES)
SDL_CONFIG := sdl11-config
WITH_SDL := 1
endif
endif
endif
endif
endif
endif
endif
ifdef WITH_SDL
ifdef SDL_CONFIG
ifeq ($(shell ${SDL_CONFIG} --cflags > /dev/null 2>&1 && echo YES),YES)
XPDEV-MT_CFLAGS += -DWITH_SDL
XPDEV-MT_CFLAGS += $(shell $(SDL_CONFIG) --cflags)
ifdef STATIC_SDL
XPDEV-MT_LIBS += $(shell $(SDL_CONFIG) --static-libs)
XPDEV-MT_CFLAGS += -DSTATIC_SDL
endif
endif
else
ifeq ($(os),darwin)
XPDEV-MT_CFLAGS += -DWITH_SDL -DSTATIC_SDL
XPDEV-MT_CFLAGS += -I/Library/Frameworks/SDL.framework/Headers
XPDEV-MT_LIBS += -framework SDL -framework Cocoa -framework Carbon -I/Library/Frameworks/SDL.framework/Headers
endif
endif
endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment