-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pico_fontstash: initial project structure
- Loading branch information
Showing
4 changed files
with
1,845 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.