Initial commit
This commit is contained in:
34
ZNet/Makefile
Normal file
34
ZNet/Makefile
Normal file
@@ -0,0 +1,34 @@
|
||||
# ZNet/Makefile
|
||||
# Makefile for ZNet, requires GNU "make"
|
||||
|
||||
BINNAME := $(DIST)/libZNet.a
|
||||
ifeq ($(TARGET),debug)
|
||||
BINNAME := $(subst .a,_d.a, $(BINNAME))
|
||||
endif
|
||||
|
||||
SRC := \
|
||||
ZNetBandwidthMeter.cpp \
|
||||
ZNetClient.cpp \
|
||||
ZNetHost.cpp \
|
||||
ZNetPacketChannel.cpp \
|
||||
ZNetPeer.cpp \
|
||||
ZNetPrivate.cpp \
|
||||
ZNetServer.cpp
|
||||
|
||||
OBJ := $(addprefix obj/$(ARCH)/$(TARGET)/,$(subst .cpp,.o,$(SRC)) )
|
||||
|
||||
$(shell mkdir -p obj/$(ARCH)/$(TARGET))
|
||||
|
||||
$(BINNAME): $(OBJ)
|
||||
$(AR) cru $@ $+
|
||||
$(RANLIB) $@
|
||||
|
||||
# CLEAN
|
||||
clean:
|
||||
@-rm -r -f obj $(DIST)/libZNet*.a
|
||||
|
||||
|
||||
# *.cpp files to *.o files
|
||||
obj/$(ARCH)/$(TARGET)/%.o: %.cpp
|
||||
@echo CXX $@
|
||||
@$(CXX) $(CXXFLAGS) -c $*.cpp -o obj/$(ARCH)/$(TARGET)/$*.o
|
||||
Reference in New Issue
Block a user