aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-02-16 11:52:23 -0500
committerSam Anthony <sam@samanthony.xyz>2025-02-16 11:52:23 -0500
commit4ba873caba1d725aa72a135e4bd5fc69a9b7ef64 (patch)
tree57f7c9646b78dfa13ddfc225a5ae5b1f750ff408 /Makefile
parent6498718bd0ea27606dc0a4e67d4a966ffe1abfdf (diff)
downloadvolute-4ba873caba1d725aa72a135e4bd5fc69a9b7ef64.zip
microui
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 31 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a3bf008..5947638 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,31 @@
-all:
- go mod tidy
- go build
- gofmt -l -s -w .
+CFLAGS = -ansi -Wall -Wextra -pedantic -Wno-deprecated-declarations
+LDFLAGS = $(shell sdl2-config --libs)
+
+# Link OpenGL.
+ifeq ($(OS),Windows_NT)
+ GLFLAG := -lopengl32
+else
+ UNAME := `uname -o 2>/dev/null || uname -s`
+ ifeq ($(UNAME),"Darwin")
+ GLFLAG := -framework OpenGL
+ else
+ GLFLAG := -lGL
+ endif
+endif
+LDFLAGS += $(GLFLAG)
+
+SRC = main.c microui.c
+OBJ = ${SRC:.c=.o}
+
+all: volute
+
+clean:
+ rm -f volute *.o
+
+volute: ${OBJ}
+ ${CC} -o $@ $^ ${LDFLAGS}
+
+%.o: %.c
+ ${CC} -c ${CFLAGS} $<
+
+${SRC}: microui.h