Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
CC = cc
CFLAGS = -std=c99 -pedantic -Wall -Wextra -O2 -D_DEFAULT_SOURCE \
-ffunction-sections -fdata-sections $(shell pkg-config --cflags sdl2)
LDFLAGS = $(shell pkg-config --libs sdl2) -lutil -Wl,--gc-sections -s
LDFLAGS = $(shell pkg-config --libs sdl2) -lutil

# special handling for Mac OS as it's linker does not support
# the garbage collection of unused sections and stripping with the
# same command line as GCC on Linux and Windows.
UNAME = $(shell uname -s)
ifeq ($(UNAME), Darwin)
LDFLAGS += -dead_strip
else
LDFLAGS += -Wl,--gc-sections -s
endif

SRC = src/main.c
BIN = RunVT
Expand Down
7 changes: 6 additions & 1 deletion src/abstraction_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
#ifndef RUNVT_ABSTRACTION_POSIX_H
#define RUNVT_ABSTRACTION_POSIX_H

#include <pty.h>
#if defined(__APPLE__)
#include <util.h>
#else
#include <pty.h>
#endif

#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
Expand Down