Sfoglia il codice sorgente

Add -fPIC for static linked library.

Lianghui 10 anni fa
parent
commit
6b044c378b
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      Makefile

+ 1 - 0
Makefile

@@ -239,6 +239,7 @@ distclean: clean
 	$(RMF) $(CPROG) lib$(CPROG).so lib$(CPROG).a *.dmg *.msi *.exe lib$(CPROG).dll lib$(CPROG).dll.a
 	$(RMF) $(CPROG) lib$(CPROG).so lib$(CPROG).a *.dmg *.msi *.exe lib$(CPROG).dll lib$(CPROG).dll.a
 	$(RMF) $(UNIT_TEST_PROG)
 	$(RMF) $(UNIT_TEST_PROG)
 
 
+lib$(CPROG).a: CFLAGS += -fPIC
 lib$(CPROG).a: $(LIB_OBJECTS)
 lib$(CPROG).a: $(LIB_OBJECTS)
 	@$(RMF) $@
 	@$(RMF) $@
 	ar cq $@ $(LIB_OBJECTS)
 	ar cq $@ $(LIB_OBJECTS)