Start_Mac fertig

This commit is contained in:
Manuel Nitsche 2025-11-04 15:00:49 +01:00
parent 323eeb7735
commit a978f21823
2 changed files with 13 additions and 24 deletions

View File

@ -42,7 +42,7 @@ int main(int argc, char *argv[])
if(placedWords == wordCount) if(placedWords == wordCount)
{ {
// Start the game if successful // Start the game if successful
startGame(wordSalad,SALAD_SIZE,words,wordCount,900); startGame(wordSalad,SALAD_SIZE,words,wordCount,600);
// welche Variable wird für windowWidth gewählt? // welche Variable wird für windowWidth gewählt?
} }
else else

View File

@ -3,24 +3,20 @@ CFLAGS = -g -Wall
LDFLAGS = -framework OpenGL -framework CoreFoundation -framework CoreGraphics -framework IOKit -framework Cocoa -framework CoreVideo LDFLAGS = -framework OpenGL -framework CoreFoundation -framework CoreGraphics -framework IOKit -framework Cocoa -framework CoreVideo
ARCH := $(shell uname -m) ARCH := $(shell uname -m)
BINARIES = ./macos-$(ARCH) BINARIES = ./macos-$(ARCH)
raylib_folder = ./raylib
unityfolder = ./unity unityfolder = ./unity
# -------------------------- RAYLIB_PATH = $(shell brew --prefix raylib)
# initiales Spiel bauen RAYLIB_INCLUDE = -I$(RAYLIB_PATH)/include
# -------------------------- RAYLIB_LIB = -L$(RAYLIB_PATH)/lib -lraylib
wordsalad_initial:
$(CC) -o wordsalad_initial $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS)
# -------------------------- wordsalad_initial:
# Normales Spiel bauen $(CC) -o wordsalad_initial $(BINARIES)/libwordsalad_complete.a $(RAYLIB_LIB) $(LDFLAGS)
# --------------------------
wordsalad: main.o input.o game.o graphicalGame.o $(BINARIES)/libraylib.a wordsalad: main.o input.o game.o graphicalGame.o
$(CC) $(CFLAGS) -o wordsalad main.o input.o game.o graphicalGame.o $(BINARIES)/libraylib.a $(LDFLAGS) $(CC) $(CFLAGS) -o wordsalad main.o input.o game.o graphicalGame.o $(RAYLIB_LIB) $(LDFLAGS)
main.o: main.c main.o: main.c
$(CC) -c $(CFLAGS) main.c $(CC) -c $(CFLAGS) $(RAYLIB_INCLUDE) main.c
input.o: input.c input.o: input.c
$(CC) -c $(CFLAGS) input.c $(CC) -c $(CFLAGS) input.c
@ -29,18 +25,11 @@ game.o: game.c
$(CC) -c $(CFLAGS) game.c $(CC) -c $(CFLAGS) game.c
graphicalGame.o: graphicalGame.c graphicalGame.o: graphicalGame.c
$(CC) -I$(raylibfolder) -c $(CFLAGS) graphicalGame.c $(CC) -c $(CFLAGS) $(RAYLIB_INCLUDE) graphicalGame.c
# --------------------------
# Unit Tests
# --------------------------
TEST_BIN = runTests TEST_BIN = runTests
test: input.o game.o unit_tests.c $(BINARIES)/libunity.a test: input.o game.o unit_tests.c $(BINARIES)/libunity.a
$(CC) -Wall -I$(unityfolder) -o $(TEST_BIN) input.o game.o unit_tests.c $(BINARIES)/libunity.a $(CC) -Wall -I$(unityfolder) -o $(TEST_BIN) input.o game.o unit_tests.c $(BINARIES)/libunity.a
# --------------------------
# Clean
# --------------------------
clean: clean:
rm -f *.o wordsalad rm -f *.o wordsalad wordsalad_initial $(TEST_BIN)