Browse Source

Add install to makefile

Bob Mottram 3 years ago
parent
commit
d1c46297d8
3 changed files with 17 additions and 3 deletions
  1. BIN
      .population.dat
  2. 16 3
      Makefile
  3. 1 0
      src/compose.c

BIN
.population.dat


+ 16 - 3
Makefile

@@ -1,9 +1,22 @@
+APP=hypercollage
+VERSION=1.10
+ARCH_TYPE=`uname -m`
 
 all:
-	gcc -Wall -std=c99 -pedantic -O3 -o hypercollage -Isrc src/*.c -lm -fopenmp
+	gcc -Wall -std=c99 -pedantic -O3 -o ${APP} -Isrc src/*.c -lm -fopenmp
 
 debug:
-	gcc -Wall -std=c99 -pedantic -g -o hypercollage -Isrc src/*.c -lm -fopenmp
+	gcc -Wall -std=c99 -pedantic -g -o ${APP} -Isrc src/*.c -lm -fopenmp
 
 clean:
-	rm -f src/*.plist unittests/*.plist hypercollage unittests/tests *.png
+	rm -f src/*.plist unittests/*.plist ${APP} unittests/tests *.png
+
+install:
+	mkdir -p $(DESTDIR)/usr/bin
+	mkdir -m 755 -p $(DESTDIR)/usr/share/man/man1
+	install -m 755 --strip $(APP) $(DESTDIR)/usr/bin
+	install -m 644 man/$(APP).1.gz $(DESTDIR)/usr/share/man/man1
+
+uninstall:
+	rm -f /usr/share/man/man1/${APP}.1.gz
+	rm -f /usr/bin/${APP}

+ 1 - 0
src/compose.c

@@ -26,6 +26,7 @@ void transform_point(int centre_x, int centre_y,
 {
     int dx = *x - centre_x;
     int dy = *y - centre_y;
+
     dx = dx*scale/100.0f;
     dy = dy*scale/100.0f;