2003-02-24 16:05:25 +00:00
|
|
|
QFCC=qfcc
|
2003-07-28 01:36:08 +00:00
|
|
|
#QCFLAGS=-z -qq -g -Werror
|
2010-12-16 12:24:53 +00:00
|
|
|
QCFLAGS=-qq -g -Werror -Wall
|
2003-03-05 04:40:37 +00:00
|
|
|
QCPPFLAGS=
|
2007-04-09 01:07:40 +00:00
|
|
|
libdir=$(shell pkg-config qfcc --variable=libdir)
|
|
|
|
includedir=$(shell pkg-config qfcc --variable=includedir)
|
2003-02-24 16:05:25 +00:00
|
|
|
|
|
|
|
libfrikbot_source = \
|
|
|
|
bot_ai.qc \
|
|
|
|
bot_fight.qc \
|
|
|
|
bot_misc.qc \
|
|
|
|
bot_move.qc \
|
|
|
|
bot_qw.qc \
|
|
|
|
bot_way.qc \
|
|
|
|
map_dm1.qc \
|
|
|
|
map_dm2.qc \
|
|
|
|
map_dm3.qc \
|
|
|
|
map_dm4.qc \
|
|
|
|
map_dm5.qc \
|
2003-07-29 20:28:18 +00:00
|
|
|
map_dm6.qc \
|
2003-07-30 16:45:28 +00:00
|
|
|
chat.r \
|
2006-12-16 14:42:55 +00:00
|
|
|
editor.r \
|
|
|
|
impulse_menu.r \
|
2003-07-31 16:57:01 +00:00
|
|
|
target.r \
|
2003-07-29 20:28:18 +00:00
|
|
|
waypoint.r
|
2003-02-24 16:05:25 +00:00
|
|
|
|
2003-03-04 03:45:22 +00:00
|
|
|
libfrikbot_obj = $(addsuffix .o,$(basename $(libfrikbot_source)))
|
2003-02-24 16:05:25 +00:00
|
|
|
libfrikbot_dep = $(addprefix .deps/,$(addsuffix .d,$(basename $(libfrikbot_source))))
|
|
|
|
|
2010-01-13 08:24:06 +00:00
|
|
|
map_%.o: map_%.qc
|
|
|
|
@mkdir -p .deps
|
|
|
|
@$(QFCC) -M -q $(QCPPFLAGS) -c $< | sed -e 's/\(\.qc\)\?\.o\>/.o/' > .deps/`basename $@ .o`.d
|
|
|
|
$(QFCC) $(QCFLAGS) -Cvector-calls $(QCPPFLAGS) -c -o $@ $<
|
|
|
|
|
2003-03-04 03:45:22 +00:00
|
|
|
%.o: %.r
|
2003-02-24 16:05:25 +00:00
|
|
|
@mkdir -p .deps
|
2003-03-04 03:45:22 +00:00
|
|
|
@$(QFCC) -M -q $(QCPPFLAGS) -c $< | sed -e 's/\(\.r\)\?\.o\>/.o/' > .deps/`basename $@ .o`.d
|
2003-02-24 16:05:25 +00:00
|
|
|
$(QFCC) $(QCFLAGS) $(QCPPFLAGS) -c -o $@ $<
|
|
|
|
|
2003-03-04 03:45:22 +00:00
|
|
|
%.o: %.qc
|
|
|
|
@mkdir -p .deps
|
|
|
|
@$(QFCC) -M -q $(QCPPFLAGS) -c $< | sed -e 's/\(\.qc\)\?\.o\>/.o/' > .deps/`basename $@ .o`.d
|
2003-02-24 16:05:25 +00:00
|
|
|
$(QFCC) $(QCFLAGS) $(QCPPFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
all: libfrikbot.a
|
|
|
|
|
|
|
|
libfrikbot.a: $(libfrikbot_obj)
|
|
|
|
pak -cf $@ $^
|
|
|
|
|
|
|
|
clean:
|
2003-03-04 03:45:22 +00:00
|
|
|
rm -f *.o *.qfo *.a *.d
|
2003-02-24 16:05:25 +00:00
|
|
|
rm -rf .deps
|
|
|
|
|
2003-07-28 17:38:19 +00:00
|
|
|
install: libfrikbot.a
|
2007-04-09 01:07:40 +00:00
|
|
|
cp frikbot.h $(DESTDIR)$(includedir)
|
|
|
|
cp libfrikbot.a $(DESTDIR)$(libdir)
|
2003-07-28 17:38:19 +00:00
|
|
|
|
2003-02-24 16:05:25 +00:00
|
|
|
-include $(libfrikbot_dep)
|