Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #15 from besser82/bugfix/ldflags
Browse files Browse the repository at this point in the history
small improvement
  • Loading branch information
tiehuis committed Mar 30, 2016
2 parents 4520781 + 1e1338f commit dccd115
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
CC ?= clang
CFLAGS += -Wno-visibility -Wno-incompatible-pointer-types -Wall -Wextra -O2 -DINVERT_COLORS -DVT100 -O2
LFLAGS +=
CC ?= clang
TTF_FONT_PATH ?= res/Anonymous Pro.ttf
CFLAGS += -DTTF_FONT_PATH="\"$(TTF_FONT_PATH)\""
CFLAGS += -Wno-visibility -Wno-incompatible-pointer-types -Wall -Wextra
CFLAGS += -DINVERT_COLORS -DVT100 -O2
LFLAGS +=

PROGRAM := 2048
C_FILES := $(wildcard src/*.c)
Expand All @@ -10,13 +13,13 @@ FILTERED_C_FILES := $(filter-out src/gfx%.c src/merge%.c, $(C_FILES))
all: terminal

curses: $(FILTERED_C_FILES) src/gfx_curses.c
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_curses.c -o $(PROGRAM) -lcurses
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_curses.c -o $(PROGRAM) $(LDFLAGS) -lcurses

terminal: $(FILTERED_C_FILES) src/gfx_terminal.c
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_terminal.c -o $(PROGRAM)
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_terminal.c -o $(PROGRAM) $(LDFLAGS)

sdl: $(FILTERED_C_FILES) src/gfx_sdl.c
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_sdl.c -o $(PROGRAM) $(shell pkg-config --cflags sdl2) -lSDL2 -lSDL2_ttf
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_sdl.c -o $(PROGRAM) $(shell pkg-config --cflags sdl2) $(LDFLAGS) -lSDL2 -lSDL2_ttf

remake: clean all

Expand Down
1 change: 0 additions & 1 deletion src/gfx_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "gfx.h"

/* Side length of a 'pixel' in pixels */
#define TTF_FONT_PATH "res/Anonymous Pro.ttf"
#define TTF_FONT_PT 32

#define iterate(n, expression)\
Expand Down

0 comments on commit dccd115

Please sign in to comment.