timer/Makefile
Zack Buhman 7a0518c35b serial_forwarder: serial parsing
This removes the dependency on libserialport
2024-06-22 23:45:08 -05:00

44 lines
760 B
Makefile

SDL ?= ../SDL
DEBUG = -g -gdwarf-4
CFLAGS += -Wall -Werror -Wfatal-errors
CFLAGS += -std=c2x
CFLAGS += -I$(SDL)/include -D_REENTRANT
CFLAGS += $(shell pkg-config --cflags freetype2)
LDFLAGS += -L$(SDL)/build -lSDL3 -Wl,-rpath=$(SDL)/build
LDFLAGS += $(shell pkg-config --libs freetype2)
DEPFLAGS = -MMD -MP
OPT = -O3 -march=native
OBJS = \
timer.o
SERIAL_FORWARDER_OBJS = \
serial_forwarder.o \
serial.o \
parse_serial.o
all: serial_forwarder
%.o: %.c
$(CC) $(CARCH) $(CFLAGS) $(OPT) $(DEBUG) $(DEPFLAGS) -MF ${<}.d -c $< -o $@
serial_forwarder: $(SERIAL_FORWARDER_OBJS)
$(CC) $(LDFLAGS) $^ -o $@
-include $(shell find -type f -name '*.d')
.SUFFIXES:
.INTERMEDIATE:
.SECONDARY:
.PHONY: all clean
%: RCS/%,v
%: RCS/%
%: %,v
%: s.%
%: SCCS/s.%