瀏覽代碼

* Move compiling rules to build/build.mk

Bryan Drewery 14 年之前
父節點
當前提交
6b7baeaa98
共有 6 個文件被更改,包括 16 次插入17 次删除
  1. 1 0
      .gitignore
  2. 1 1
      Makefile.in
  3. 1 1
      build/autotools/configure.ac
  4. 9 0
      build/build.mk.in
  5. 2 1
      configure
  6. 2 14
      src/Makefile.in

+ 1 - 0
.gitignore

@@ -7,6 +7,7 @@
 /build/config.status
 /build/stamp.*
 /build/autotools/src
+/build/build.mk
 /*.tgz
 /leaf
 /hub

+ 1 - 1
Makefile.in

@@ -12,7 +12,7 @@ VPATH = @srcdir@
 CCDEPMODE = @CCDEPMODE@
 BINEXEC = wraith@EXEEXT@
 
-STATICMAKEFILES = lib/Makefile src/mod/Makefile src/crypto/Makefile src/compat/Makefile src/Makefile Makefile
+STATICMAKEFILES = lib/Makefile src/mod/Makefile src/crypto/Makefile src/compat/Makefile src/Makefile Makefile build/build.mk
 CONFIGFILES = build/config.cache build/config.log build/config.status src/config.h src/buildinfo.h
 
 DISTROFILES = README LICENSE build doc scripts lib Makefile.in build.sh configure src BSDmakefile

+ 1 - 1
build/autotools/configure.ac

@@ -220,7 +220,7 @@ EGG_SUBST_VERSION
 EGG_SUBST_MOD_UPDIR
 DO_DEPS
 
-AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile src/compat/Makefile src/crypto/Makefile src/mod/Makefile src/buildinfo.h])
+AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile src/compat/Makefile src/crypto/Makefile src/mod/Makefile src/buildinfo.h build/build.mk])
 AC_OUTPUT
 
 AH_TEMPLATE(HAVE_ST_MTIM, [Define to 1 if your struct stat has an st_mtim member])

+ 9 - 0
build/build.mk.in

@@ -0,0 +1,9 @@
+depcomp = /bin/sh $(top_srcdir)/build/autotools/depcomp
+
+%.o: %.c stringfix
+	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
+	@./stringfix@EXEEXT@ $< _$< || cp -f $< _$<
+	source='$<' object='$@' depfile='.deps/$*.Po' tmpdepfile='.deps/$*.TPo' depmode=$(CCDEPMODE) $(depcomp) \
+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c _$<  -o `basename $< .c`.o 2> >(sed -e "s:_$<:$<:")
+	@rm -f _$<
+

+ 2 - 1
configure

@@ -8612,7 +8612,7 @@ $as_echo X"$mf" |
 done
 
 
-ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile src/compat/Makefile src/crypto/Makefile src/mod/Makefile src/buildinfo.h"
+ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile src/compat/Makefile src/crypto/Makefile src/mod/Makefile src/buildinfo.h build/build.mk"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -9325,6 +9325,7 @@ do
     "src/crypto/Makefile") CONFIG_FILES="$CONFIG_FILES src/crypto/Makefile" ;;
     "src/mod/Makefile") CONFIG_FILES="$CONFIG_FILES src/mod/Makefile" ;;
     "src/buildinfo.h") CONFIG_FILES="$CONFIG_FILES src/buildinfo.h" ;;
+    "build/build.mk") CONFIG_FILES="$CONFIG_FILES build/build.mk" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac

+ 2 - 14
src/Makefile.in

@@ -4,13 +4,14 @@ SHELL = @SHELL@
 top_srcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
-depcomp = /bin/sh $(top_srcdir)/build/autotools/depcomp
 
 @SET_MAKE@
 
 CXXFLAGS = @CXXFLAGS@ -I. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/pack @DEFS@ $(INCLUDES) $(CFLGS) '-DCOMMIT="$(COMMIT)"' '-DBRANCH="$(BRANCH)"' -DBUILDTS=$(BUILDTS) '-DVERSION="$(VERSION)"'
 CPPFLAGS = @CPPFLAGS@
 
+include $(top_srcdir)/build/build.mk
+
 OBJCOPY = @OBJCOPY@
 
 OBJS = auth.o \
@@ -128,16 +129,3 @@ mycrypto:
 	+@cd crypto && $(MAKE_GENERIC) crypto
 
 include ./.deps/includes
-
-.SUFFIXES:
-.SUFFIXES: .c .h .o
-
-.c.o: stringfix
-	@echo -e "Compiling: \033[1m`basename $< .c`\033[0m"
-	@./stringfix@EXEEXT@ $< _$< || cp -f $< _$<
-	source='$<' object='$@' depfile='.deps/$*.Po' tmpdepfile='.deps/$*.TPo' depmode=$(CCDEPMODE) $(depcomp) \
-	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c _$<  -o `basename $< .c`.o 2> >(sed -e "s:_$<:$<:")
-	@rm -f _$<
-
-#safety hash
-