Add script to convert BOM with remote server
[eda-utils.git] / bomgen / Makefile
index 4f5dcbd..60e34bd 100644 (file)
@@ -6,20 +6,28 @@ ifndef PREFIX
 PREFIX=/usr
 endif
 
+SCRIPT = bomgen.php
 INC_DIR = Bomgen
-SCRIPT1 = bomgen.php
-SCRIPT2 = functions.inc.php
+INC_FILES = \
+    functions.inc.php \
+    refdes.inc.php \
+    conf.inc.php \
+    digikey.inc.php \
+    mapping.inc.php \
+    pcad.inc.php \
+    altium.inc.php
 
 SYSCONFDIR=/etc
 
-
 # Top-level rule, do nothing
 all: $(SCRIPT)
 
 install:
-       install -D -m 755 $(SCRIPT1) $(PREFIX)/bin/$(SCRIPT1)
+       install -D -m 755 $(SCRIPT) $(PREFIX)/bin
        install -d -m 755 $(PREFIX)/share/php/$(INC_DIR)
-       install -D -m 755 $(INC_DIR)/$(SCRIPT2) $(PREFIX)/share/php/$(INC_DIR)
+       for f in $(INC_FILES); do \
+           install -D -m 644 $(INC_DIR)/$${f} $(PREFIX)/share/php/$(INC_DIR); \
+       done
 
 # Do nothing
 clean: