quote-bot/makefile
2021-03-08 23:16:14 -05:00

37 lines
1.0 KiB
Makefile

CC = g++
CFLAGS += -g -O -Wall -Weffc++ -pedantic \
-pedantic-errors -Wextra -Waggregate-return -Wcast-align \
-Wcast-qual -Wconversion \
-Wdisabled-optimization \
-Werror -Wfloat-equal -Wformat=2 \
-Wformat-nonliteral -Wformat-security \
-Wformat-y2k \
-Wimport -Winit-self -Winline \
-Winvalid-pch \
-Wlong-long \
-Wmissing-field-initializers -Wmissing-format-attribute \
-Wmissing-include-dirs -Wmissing-noreturn \
-Wpacked -Wpadded -Wpointer-arith \
-Wredundant-decls \
-Wshadow -Wstack-protector \
-Wstrict-aliasing=2 -Wswitch-default \
-Wswitch-enum \
-Wunreachable-code -Wunused \
-Wunused-parameter \
-Wvariadic-macros \
-Wwrite-strings
#-ggdb -O0 -std=c89 -W -Wall -Wextra -pedantic
LDFLAGS += -lpthread -lircclient -lsqlite3
all: spammer
spammer: spammer.o io.o db.o events.o
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
# TODO: client side / offline access
db: db.o io.o
$(CC) -DTEST_DB $(CFLAGS) $^ -o $@ $(LDFLAGS)
clean:
$(RM) -rf spammer db a.out *.o *.db