include ../../toprules.make

TOPDIR = ../..
Q3DED = iq3ded

INCLUDES += -I$(TOPDIR) -I$(TOPDIR)/quake3 -I$(MERC_DIR) -I$(COLY_DIR)
# (depends on colyseus only for debugging utils and stuff)
LDFLAGS += -L$(TOPDIR)/quake3 -L$(TOPDIR)/../../Colyseus
COMMON_LIBS = -ldl -l$(Q3DED) -lgmp -lpthread -lz -lcolyseus-wan

TARGET = iquake3

all: $(TARGET) 
	cp -f $(TARGET) $(TOPDIR)

$(TARGET): main.cpp $(TOPDIR)/quake3/lib$(Q3DED).a
	$(CPP) $(INCLUDES) $(CPPFLAGS) $(LDFLAGS) main.cpp $(COMMON_LIBS) -o $@

###############################################################
clean: $(SUBDIRS) 

include ../../botrules.make
