2010-12-19 22:29:01 +00:00
|
|
|
include ../../Makefile.common
|
|
|
|
include ../../$(EROOT)/Makefile.shared
|
|
|
|
|
2009-12-05 09:22:43 +00:00
|
|
|
OBJ=obj
|
2010-12-19 22:29:01 +00:00
|
|
|
OBJNAME=libenet.a
|
2009-12-05 09:22:43 +00:00
|
|
|
SRC=src
|
2010-06-22 21:50:01 +00:00
|
|
|
INC=include
|
2009-12-05 09:22:43 +00:00
|
|
|
|
2011-06-17 11:53:41 +00:00
|
|
|
CFLAGS=$(BASECFLAGS) $(BUILDCFLAGS) $(F_NO_STACK_PROTECTOR)
|
2010-12-19 22:29:01 +00:00
|
|
|
# for BUILD_ECHOFLAGS:
|
|
|
|
OURCFLAGS=$(CFLAGS)
|
2010-12-17 14:22:15 +00:00
|
|
|
CPPFLAGS=-I$(INC) -I$(SRC) -I../../$(EROOT)/include
|
2009-12-05 09:22:43 +00:00
|
|
|
|
2010-12-19 22:29:01 +00:00
|
|
|
|
2009-12-05 09:22:43 +00:00
|
|
|
OBJECTS=$(OBJ)/callbacks.o \
|
|
|
|
$(OBJ)/host.o \
|
|
|
|
$(OBJ)/list.o \
|
|
|
|
$(OBJ)/packet.o \
|
|
|
|
$(OBJ)/peer.o \
|
2010-06-22 21:50:01 +00:00
|
|
|
$(OBJ)/protocol.o \
|
|
|
|
$(OBJ)/compress.o
|
2009-12-05 09:22:43 +00:00
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2010-12-19 22:29:01 +00:00
|
|
|
OBJECTS+= $(OBJ)/win32.o
|
|
|
|
OBJNAME=libenet_win32.a
|
|
|
|
OBJ=obj_win
|
2009-12-05 09:22:43 +00:00
|
|
|
else
|
2010-12-19 22:29:01 +00:00
|
|
|
OBJECTS+= $(OBJ)/unix.o
|
2009-12-05 09:22:43 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# OBJECTS=$(SOURCES:%.c=$(OBJ)/%.o)
|
|
|
|
|
|
|
|
$(OBJNAME): $(OBJECTS)
|
2010-12-19 22:29:01 +00:00
|
|
|
$(BUILD_ECHOFLAGS)
|
|
|
|
$(ARCHIVE_STATUS)
|
|
|
|
if $(AR) cr $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
|
2009-12-05 09:22:43 +00:00
|
|
|
|
2010-06-22 21:50:01 +00:00
|
|
|
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c $(INC)/enet/*.h
|
2009-12-05 09:22:43 +00:00
|
|
|
-mkdir -p $(OBJ)
|
|
|
|
$(COMPILE_STATUS)
|
|
|
|
if $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
2010-08-17 20:00:44 +00:00
|
|
|
|
2009-12-05 09:22:43 +00:00
|
|
|
ifeq ($(PRETTY_OUTPUT),1)
|
|
|
|
.SILENT:
|
|
|
|
endif
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
-rm -f $(OBJECTS) $(OBJNAME)
|