install library preserving symbolic links

Use cp to preserve symlinks in install target.
Fix dependencies for native language support. I changed the variable
name in the previos commit and forget to change it here.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
diff --git a/Makefile b/Makefile
index af5e94c..b0c4971 100644
--- a/Makefile
+++ b/Makefile
@@ -78,6 +78,7 @@
 
 # Toolchain: what tools do we use, and what options do they need:
 
+CP = cp -fpR
 INSTALL = /usr/bin/install -c
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_DATA  = ${INSTALL} -m 644
@@ -193,16 +194,16 @@
 
 libcpufreq: libcpufreq.so.$(LIB_MAJ)
 
-cpufreq-%: libcpufreq.so.$(LIB_MAJ) $(UTIL_OBJS)
+cpufreq-%: libcpufreq.so.$(LIB_MAJ) $(UTIL_SRC)
 	$(QUIET) $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I./lib/ -c -o utils/$@.o utils/$*.c
 	$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@ utils/$@.o -lcpufreq
 	$(QUIET) $(STRIPCMD) $@
 
 utils: cpufreq-info cpufreq-set cpufreq-aperf
 
-po/$(PACKAGE).pot: $(UTIL_OBJS)
+po/$(PACKAGE).pot: $(UTIL_SRC)
 	@xgettext --default-domain=$(PACKAGE) --add-comments \
-		--keyword=_ --keyword=N_ $(UTIL_OBJS) && \
+		--keyword=_ --keyword=N_ $(UTIL_SRC) && \
 	test -f $(PACKAGE).po && \
 	mv -f $(PACKAGE).po po/$(PACKAGE).pot
 
@@ -234,7 +235,7 @@
 
 install-lib:
 	$(INSTALL) -d $(DESTDIR)${libdir}
-	$(INSTALL) libcpufreq.so* $(DESTDIR)${libdir}/
+	$(CP) libcpufreq.so* $(DESTDIR)${libdir}/
 	$(INSTALL) -d $(DESTDIR)${includedir}
 	$(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h
 
@@ -259,7 +260,7 @@
 	@#DESTDIR must be set from outside to survive
 	@sbindir=$(sbindir) bindir=$(bindir) docdir=$(docdir) confdir=$(confdir) $(MAKE) -C bench install
        
-install: install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH)
+install: all install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH)
 
 uninstall:
 	- rm -f $(DESTDIR)${libdir}/libcpufreq.*