quote-bot/makefile
2021-03-09 01:39:19 -05:00

39 lines
1.1 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
OBJ = db.o events.o io.o levenshtein.o spammer.o
all: spammer
spammer: $(OBJ)
$(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 *.sqlite3