Skip to content

Commit

Permalink
pico_fontstash: initial project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
empyreanx committed Jul 14, 2024
1 parent d57dbe2 commit 703a378
Show file tree
Hide file tree
Showing 4 changed files with 1,845 additions and 0 deletions.
35 changes: 35 additions & 0 deletions examples_pico_fontstash/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
CFLAGS = $(shell pkg-config --cflags sdl2)
CLIBS = $(shell pkg-config --libs sdl2)

ifeq ($(OS),Windows_NT)
CC = clang # gcc produces too many spurious warnings
CFLAGS += -g -std=c11 -Wall -Wextra -Wpedantic -I .
CLIBS += -lmingw32 -lwinmm -lSDL2main -lSDL2 -lm
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
CC = gcc
CFLAGS += -g -std=c11 -Wall -Wextra -Wpedantic -I . #-pg
CLIBS += -lSDL2 -ldl -lm -lGL# -pg
endif
ifeq ($(UNAME_S),Darwin)
CC = clang
CFLAGS += -g -std=c11 -Wall -Wextra -Wpedantic -I .
CLIBS += -lSDL2 -ldl -lm -framework OpenGL
endif
endif

DEPS = ../pico_gfx.h ../pico_fontstash.h

all: example

%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

example: example.o $(DEPS)
$(CC) -o example example.o $(CLIBS)

.PHONY: clean

clean:
rm -f examples *.o
7 changes: 7 additions & 0 deletions examples_pico_fontstash/example.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#define PICO_FONTSTASH_IMPLEMENTATION
#include "../pico_fontstash.h"

int main(int argc, char* argv[])
{
return 0;
}
Loading

0 comments on commit 703a378

Please sign in to comment.