diff --git a/net/vlmcsd/Makefile b/net/vlmcsd/Makefile index 5ca8cb55..dd36246a 100644 --- a/net/vlmcsd/Makefile +++ b/net/vlmcsd/Makefile @@ -2,14 +2,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vlmcsd PKG_VERSION:=svn1113 -PKG_RELEASE:=3 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/Wind4/vlmcsd/tar.gz/$(PKG_VERSION)? PKG_HASH:=62f55c48f5de1249c2348ab6b96dabbe7e38899230954b0c8774efb01d9c42cc -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=fuyumi <280604399@qq.com> PKG_BUILD_PARALLEL:=1 @@ -20,7 +18,6 @@ define Package/vlmcsd SECTION:=net CATEGORY:=Network TITLE:=vlmcsd for OpenWRT - URL:=http://forums.mydigitallife.info/threads/50234 DEPENDS:=+libpthread endef @@ -28,8 +25,10 @@ define Package/vlmcsd/description vlmcsd is a KMS Emulator in C. endef -MAKE_FLAGS += \ - -C $(PKG_BUILD_DIR) +define Build/Prepare + $(call Build/Prepare/Default) + rm $(PKG_BUILD_DIR)/GNUmakefile +endef define Package/vlmcsd/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/net/vlmcsd/src/Makefile b/net/vlmcsd/src/Makefile new file mode 100644 index 00000000..cce6da15 --- /dev/null +++ b/net/vlmcsd/src/Makefile @@ -0,0 +1,35 @@ +SRCDIR := src +BINDIR := bin +OBJDIR := build + +TARGETS := $(BINDIR)/vlmcs $(BINDIR)/vlmcsd + +.PHONY: all +all: $(BINDIR) $(TARGETS) + +$(BINDIR)/vlmcs: $(OBJDIR)/vlmcs.o $(OBJDIR)/kmsdata-full.o $(OBJDIR)/crypto.o \ + $(OBJDIR)/kms.o $(OBJDIR)/endian.o $(OBJDIR)/output.o \ + $(OBJDIR)/shared_globals.o $(OBJDIR)/helpers.o \ + $(OBJDIR)/network.o $(OBJDIR)/rpc.o \ + $(OBJDIR)/crypto_internal.o $(OBJDIR)/dns_srv.o + $(CC) $(LDFLAGS) -o $@ $^ + +$(BINDIR)/vlmcsd: $(OBJDIR)/vlmcsd.o $(OBJDIR)/kmsdata.o $(OBJDIR)/crypto.o \ + $(OBJDIR)/kms.o $(OBJDIR)/endian.o $(OBJDIR)/output.o \ + $(OBJDIR)/shared_globals.o $(OBJDIR)/helpers.o \ + $(OBJDIR)/network.o $(OBJDIR)/rpc.o \ + $(OBJDIR)/crypto_internal.o + $(CC) $(LDFLAGS) -o $@ $^ + +$(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR) + $(CC) $(CFLAGS) -c $< -o $@ + +$(OBJDIR): + @mkdir -p $(OBJDIR) + +$(BINDIR): + @mkdir -p $(BINDIR) + +.PHONY: clean +clean: + @rm -rf $(OBJDIR) $(BINDIR)