2012-02-03 00:00:15 +00:00
|
|
|
CC = gcc
|
2012-04-30 01:09:42 +01:00
|
|
|
WARNS = -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-but-set-variable \
|
|
|
|
-Wno-unused-result
|
2012-05-20 22:21:02 +01:00
|
|
|
LIBS = -lncurses -L ~/lib -lstrophe -lxml2 -lexpat -lssl -lresolv -lcrypto `pkg-config --libs glib-2.0`
|
2012-05-20 20:46:58 +01:00
|
|
|
TESTLIB = -L ~/lib -l headunit `pkg-config --libs glib-2.0`
|
2012-03-02 01:51:40 +00:00
|
|
|
CPPLIB = -lstdc++
|
2012-04-24 00:40:10 +01:00
|
|
|
CFLAGS = -I ~/include -O3 $(WARNS) $(LIBS) `pkg-config --cflags glib-2.0`
|
2012-02-12 22:20:21 +00:00
|
|
|
OBJS = log.o windows.o title_bar.o status_bar.o input_win.o jabber.o \
|
2012-04-30 01:09:42 +01:00
|
|
|
profanity.o util.o command.o history.o contact_list.o prof_history.o \
|
2012-05-19 21:56:23 +01:00
|
|
|
contact.o preferences.o prof_autocomplete.o common.o main.o
|
2012-05-04 01:00:01 +01:00
|
|
|
TESTOBJS = test_contact_list.o contact_list.o contact.o \
|
2012-05-13 23:06:01 +01:00
|
|
|
test_util.o test_prof_history.o prof_history.o util.o \
|
2012-05-19 22:05:54 +01:00
|
|
|
test_prof_autocomplete.o prof_autocomplete.o common.o
|
2012-02-03 00:00:15 +00:00
|
|
|
|
2012-02-05 15:10:10 +00:00
|
|
|
profanity: $(OBJS)
|
|
|
|
$(CC) -o profanity $(OBJS) $(LIBS)
|
|
|
|
|
2012-05-19 21:56:23 +01:00
|
|
|
common.o: common.h
|
2012-02-05 15:10:10 +00:00
|
|
|
log.o: log.h
|
2012-05-10 09:55:55 +01:00
|
|
|
windows.o: windows.h util.h contact_list.h preferences.h
|
2012-02-08 23:49:46 +00:00
|
|
|
title_bar.o: windows.h
|
2012-02-12 22:20:21 +00:00
|
|
|
status_bar.o: windows.h util.h
|
2012-05-10 23:51:06 +01:00
|
|
|
input_win.o: windows.h preferences.h
|
2012-03-08 00:46:24 +00:00
|
|
|
jabber.o: jabber.h log.h windows.h contact_list.h
|
2012-05-13 23:06:01 +01:00
|
|
|
profanity.o: log.h windows.h jabber.h command.h preferences.h \
|
|
|
|
contact_list.h
|
2012-02-09 00:48:17 +00:00
|
|
|
util.o: util.h
|
2012-03-08 00:46:24 +00:00
|
|
|
command.o: command.h util.h history.h contact_list.h
|
2012-05-01 00:24:31 +01:00
|
|
|
history.o: history.h prof_history.h
|
2012-05-13 23:06:01 +01:00
|
|
|
contact_list.o: contact_list.h contact.h prof_autocomplete.h
|
2012-04-30 01:09:42 +01:00
|
|
|
prof_history.o: prof_history.h
|
2012-05-04 01:00:01 +01:00
|
|
|
contact.o: contact.h
|
2012-05-10 09:55:55 +01:00
|
|
|
preferences.o: preferences.h
|
2012-05-19 22:05:54 +01:00
|
|
|
prof_autocomplete.o: prof_autocomplete.h common.h
|
2012-03-01 01:54:19 +00:00
|
|
|
main.o: profanity.h
|
2012-02-03 00:00:15 +00:00
|
|
|
|
2012-05-04 01:00:01 +01:00
|
|
|
test_contact_list.o: contact_list.h contact.h
|
2012-04-19 22:26:12 +01:00
|
|
|
test_util.o: util.h
|
2012-04-30 01:09:42 +01:00
|
|
|
test_prof_history.o: prof_history.h
|
2012-05-18 01:33:40 +01:00
|
|
|
test_prof_autocomplete.o: contact.h prof_autocomplete.h
|
2012-03-02 01:51:40 +00:00
|
|
|
|
|
|
|
testsuite: testsuite.h $(TESTOBJS)
|
|
|
|
$(CC) $(CFLAGS) $(CPPLIB) testsuite.c $(TESTOBJS) -o testsuite $(TESTLIB)
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test: testsuite
|
|
|
|
./testsuite
|
|
|
|
|
2012-02-03 00:00:15 +00:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f profanity
|
2012-02-05 15:22:02 +00:00
|
|
|
rm -f profanity.log
|
2012-02-06 01:29:53 +00:00
|
|
|
rm -f *.o
|
2012-03-02 01:51:40 +00:00
|
|
|
rm -f testsuite
|