Skip to content

Commit

Permalink
Check if SOUND equals to 1 in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong committed Mar 25, 2023
1 parent f15c84c commit 0321f99
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -681,12 +681,12 @@ ifeq ($(TILES), 1)
-I$(FRAMEWORKSDIR)/SDL2.framework/Headers \
-I$(FRAMEWORKSDIR)/SDL2_image.framework/Headers \
-I$(FRAMEWORKSDIR)/SDL2_ttf.framework/Headers
ifdef SOUND
ifeq ($(SOUND), 1)
OSX_INC += -I$(FRAMEWORKSDIR)/SDL2_mixer.framework/Headers
endif
LDFLAGS += -F$(FRAMEWORKSDIR) \
-framework SDL2 -framework SDL2_image -framework SDL2_ttf -framework Cocoa
ifdef SOUND
ifeq ($(SOUND), 1)
LDFLAGS += -framework SDL2_mixer
endif
CXXFLAGS += $(OSX_INC)
Expand All @@ -697,7 +697,7 @@ ifeq ($(TILES), 1)
-I$(shell dirname $(shell sdl2-config --cflags | sed 's/-I\(.[^ ]*\) .*/\1/'))
LDFLAGS += -framework Cocoa $(shell sdl2-config --libs) -lSDL2_ttf
LDFLAGS += -lSDL2_image
ifdef SOUND
ifeq ($(SOUND), 1)
LDFLAGS += -lSDL2_mixer
endif
endif
Expand Down Expand Up @@ -1151,7 +1151,7 @@ endif
ifeq ($(TILES), 1)
ifeq ($(SOUND), 1)
cp -R data/sound $(APPDATADIR)
endif # ifdef SOUND
endif # ifeq ($(SOUND), 1)
cp -R gfx $(APPRESOURCESDIR)/
ifdef FRAMEWORK
cp -R $(FRAMEWORKSDIR)/SDL2.framework $(APPRESOURCESDIR)/
Expand All @@ -1162,7 +1162,7 @@ ifeq ($(SOUND), 1)
cd $(APPRESOURCESDIR)/ && ln -s SDL2_mixer.framework/Frameworks/Vorbis.framework Vorbis.framework
cd $(APPRESOURCESDIR)/ && ln -s SDL2_mixer.framework/Frameworks/Ogg.framework Ogg.framework
cd $(APPRESOURCESDIR)/SDL2_mixer.framework/Frameworks && find . -maxdepth 1 -type d -not -name '*Vorbis.framework' -not -name '*Ogg.framework' -not -name '.' | xargs rm -rf
endif # ifdef SOUND
endif # ifeq ($(SOUND), 1)
endif # ifdef FRAMEWORK
endif # ifdef TILES

Expand Down

0 comments on commit 0321f99

Please sign in to comment.