@@ -15,7 +15,7 @@ jobs:
sudo apt-get install -qq libsdl2-dev libglew-dev
- name: build te
run: |
- make
+ ./build.sh
env:
CC: gcc
build-linux-clang:
@@ -28,7 +28,7 @@ jobs:
CC: clang
build-macos:
@@ -39,7 +39,7 @@ jobs:
run: brew install sdl2 pkg-config glew
build-windows-msvc:
@@ -1,7 +0,0 @@
-PKGS=sdl2 glew
-CFLAGS=-Wall -Wextra -std=c11 -pedantic -ggdb `pkg-config --cflags $(PKGS)`
-LIBS=`pkg-config --libs $(PKGS)` -lm
-SRCS=src/main.c src/la.c src/editor.c src/font.c src/sdl_extra.c src/file.c src/gl_extra.c
-
-te: $(SRCS)
- $(CC) $(CFLAGS) -o te $(SRCS) $(LIBS)
@@ -3,6 +3,6 @@
# Quick Start
```console
-$ make
+$ ./build.sh
$ ./te main.c
```
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -xe
+CC="${CXX:-cc}"
+PKGS="sdl2 glew"
+CFLAGS="-Wall -Wextra -std=c11 -pedantic -ggdb"
+LIBS=-lm
+SRC="src/main.c src/la.c src/editor.c src/font.c src/sdl_extra.c src/file.c src/gl_extra.c"
+if [ `uname` = "Darwin" ]; then
+ CFLAGS+=" -framework OpenGL"
+fi
+$CC $CFLAGS `pkg-config --cflags $PKGS` -o te $SRC $LIBS `pkg-config --libs $PKGS`