Эх сурвалжийг харах

added build of static binary

Wolfgang Ortmann 9 жил өмнө
parent
commit
03e9c404ec
3 өөрчлөгдсөн 8 нэмэгдсэн , 2 устгасан
  1. BIN
      bin/kind
  2. 7 1
      src/Makefile
  3. 1 1
      src/kind.cpp

BIN
bin/kind


+ 7 - 1
src/Makefile

@@ -3,7 +3,8 @@
 
 OBJECTS = kind.o filetools.o FileName.o DateTime.o stringtools.o KindConfig.o Lexer.o rulecomp.o
 
-LOPT := $(OPT)
+LOPT := $(OPT) 
+#-static
 COPT := $(OPT) -std=c++11
 LIBS := 
 
@@ -33,6 +34,11 @@ ASTYLE_OPT = --style=gnu --unpad-paren --pad-header --pad-oper --indent-namespac
 kind: $(OBJECTS)
 	$(CXX) $(LOPT) $(LIBRARY) -o kind $(OBJECTS) $(LIBS)
 
+static: kind
+	$(CXX) $(LOPT) $(LIBRARY) -static -o kind_static $(OBJECTS) $(LIBS)
+	strip kind_static
+	cp kind_static ../bin/kind
+
 clean:
 	-rm -f *.o depend *~ *orig
 

+ 1 - 1
src/kind.cpp

@@ -169,7 +169,7 @@ void readMasterConfig(const string& fn, KindConfig& conf)
 # 81 "kind.ag"
   else if (fileExists("/etc/kind/master.conf"))
 # 82 "kind.ag"
-    readMasterConfig1("etc/kind/master.conf", conf);
+    readMasterConfig1("/etc/kind/master.conf", conf);
 # 83 "kind.ag"
   else if (fileExists("/ffp/etc/kind/master.conf"))
 # 84 "kind.ag"