Update Makefile

This commit is contained in:
Jason Bou-Samra
2024-11-27 19:08:01 +11:00
committed by GitHub
parent 5dae278c68
commit 08c4ed5b9f
+17
View File
@@ -1,7 +1,24 @@
#! /bin/make
# :vim: set noexpandtab:
ifeq ($(OS),Windows_NT)
detected_OS := Windows
else
detected_OS := $(shell uname -s)
endif
$(info Detected OS: $(detected_OS))
ifeq ($(detected_OS),Darwin)
# brew install libsodium
# brew install sdl2
# brew install sdl2_image
CFLAGS = -lm `sdl2-config --cflags --libs` -lsodium -lsdl2 -lsdl2_image -I/opt/homebrew/include -L/opt/homebrew/lib
else
CFLAGS = -lm -lSDL2_image `sdl2-config --cflags --libs` -lsodium -s
endif
columns: main.c column.c research.c render.c backdrop.c sdl.c events.c hiscore.c text.c menu.c level.c column.h research.h render.h backdrop.h sdl.h events.h hiscore.h text.h menu.h sprite_sheet.h level.h
$(CC) main.c column.c research.c render.c backdrop.c sdl.c events.c hiscore.c text.c menu.c level.c -o columns $(CFLAGS)