]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - makefile
move extension enables to the top of the shader to comply with spec
[xonotic/darkplaces.git] / makefile
index ee88a37c4dabea2a868fa31a66fc7d03b981b4ee..35de328396cb28f3f0d9338264f4e9082d901409 100644 (file)
--- a/makefile
+++ b/makefile
@@ -47,6 +47,12 @@ else
        UNIX_X11LIBPATH:=/usr/X11R6/lib
 endif
 
+# default targets
+TARGETS_DEBUG=sv-debug cl-debug sdl-debug
+TARGETS_PROFILE=sv-profile cl-profile sdl-profile
+TARGETS_RELEASE=sv-release cl-release sdl-release
+TARGETS_RELEASE_PROFILE=sv-release-profile cl-release-profile sdl-release-profile
+TARGETS_NEXUIZ=sv-nexuiz cl-nexuiz sdl-nexuiz
 
 # Linux configuration
 ifeq ($(DP_MAKE_TARGET), linux)
@@ -61,9 +67,9 @@ ifeq ($(DP_MAKE_TARGET), linux)
        LDFLAGS_SV=$(LDFLAGS_LINUXSV)
        LDFLAGS_SDL=$(LDFLAGS_LINUXSDL)
 
-       SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS)
-       SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS)
-       SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS)
+       SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS) $(SDLCONFIG_UNIXCFLAGS_X11)
+       SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS) $(SDLCONFIG_UNIXLIBS_X11)
+       SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS) $(SDLCONFIG_UNIXSTATICLIBS_X11)
 
        EXE_CL=$(EXE_UNIXCL)
        EXE_SV=$(EXE_UNIXSV)
@@ -109,6 +115,14 @@ ifeq ($(DP_MAKE_TARGET), macosx)
        # we don't currently link to libjpeg on Mac because the OS does not have an easy way to load libjpeg and we provide our own in the .app
        CFLAGS_LIBJPEG=
        LIB_JPEG=
+
+       # on OS X, we don't build the CL by default because it uses deprecated
+       # and not-implemented-in-64bit Carbon
+       TARGETS_DEBUG=sv-debug sdl-debug
+       TARGETS_PROFILE=sv-profile sdl-profile
+       TARGETS_RELEASE=sv-release sdl-release
+       TARGETS_RELEASE_PROFILE=sv-release-profile sdl-release-profile
+       TARGETS_NEXUIZ=sv-nexuiz sdl-nexuiz
 endif
 
 # SunOS configuration (Solaris)
@@ -126,9 +140,9 @@ ifeq ($(DP_MAKE_TARGET), sunos)
        LDFLAGS_SV=$(LDFLAGS_SUNOSSV)
        LDFLAGS_SDL=$(LDFLAGS_SUNOSSDL)
 
-       SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS)
-       SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS)
-       SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS)
+       SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS) $(SDLCONFIG_UNIXCFLAGS_X11)
+       SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS) $(SDLCONFIG_UNIXLIBS_X11)
+       SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS) $(SDLCONFIG_UNIXSTATICLIBS_X11)
 
        EXE_CL=$(EXE_UNIXCL)
        EXE_SV=$(EXE_UNIXSV)
@@ -159,9 +173,9 @@ endif
        LDFLAGS_SV=$(LDFLAGS_BSDSV)
        LDFLAGS_SDL=$(LDFLAGS_BSDSDL)
 
-       SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS)
-       SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS)
-       SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS)
+       SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS) $(SDLCONFIG_UNIXCFLAGS_X11)
+       SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS) $(SDLCONFIG_UNIXLIBS_X11)
+       SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS) $(SDLCONFIG_UNIXSTATICLIBS_X11)
 
        EXE_CL=$(EXE_UNIXCL)
        EXE_SV=$(EXE_UNIXSV)
@@ -199,7 +213,7 @@ ifeq ($(D3D), 1)
        LDFLAGS_D3D=-ld3d9
 else
        CFLAGS_D3D=
-       CFLAGS_WARNINGS=-Wall -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement
+       CFLAGS_WARNINGS=-Wall -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement -Wmissing-prototypes
        LDFLAGS_D3D=
 endif
 
@@ -312,3 +326,10 @@ include makefile.inc
 ##### Dependency files #####
 
 -include *.d
+
+# hack to deal with no-longer-needed .h files
+%.h:
+       @echo
+       @echo "NOTE: file $@ mentioned in dependencies missing, continuing..."
+       @echo "HINT: consider 'make clean'"
+       @echo