summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 7dadb831c282300d31faac2124882c51b0452f58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = gnu
AM_CFLAGS = -Wall

bin_PROGRAMS = mts-id-eeprom mts-wait-for-cell-reset
sbin_PROGRAMS = mts-hashpwd mts-fpga-loader
mts_hashpwd_SOURCES = hashpwd.cpp
mts_id_eeprom_SOURCES = eeprom_main.c
mts_wait_for_cell_reset_SOURCES = mts_wait_for_cell_reset.c
noinst_HEADERS = eeprom.h  log.h  mts_error_codes.h  mts_fpga_hash.h  mts_fpga_reg.h  mts_fpga_spi.h
mts_hashpwd_LDADD = -lcrypto

mts_fpga_loader_SOURCES =  mts_fpga_hash.c  mts_fpga_reg.c  mts_fpga_spi.c  mts_fpga_loader.c
mts_fpga_loader_LDADD = -lrt -lm  -lssl -lcrypto

sbin_SCRIPTS = ubpasswd.sh mts-fpga-loader.sh
EXTRA_DIST =

SUFFIXES = .sh

.sh:
	$(shbin_verbose) cp $< $@.tmp
	$(AM_V_at) chmod 0744 $@.tmp
	$(AM_V_at) mv -f $@.tmp $@

# Since this is Yocto we just make it work by moving
# the sbin stuff to /sbin, and set permissions
# on the script for root.
install-exec-hook:
	cd $(DESTDIR)$(sbindir) && mkdir ../../sbin && \
		mv ubpasswd.sh ../../sbin/mts-ubpasswd && \
		chmod 0744 ../../sbin/mts-ubpasswd
	cd $(DESTDIR)$(sbindir) && \
		mv mts-fpga-loader.sh ../../sbin/mts-fpga-loader && \
		chmod 0744 ../../sbin/mts-fpga-loader
	cd $(DESTDIR)$(sbindir) && \
		mv mts-hashpwd ../../sbin/mts-hashpwd
	cd $(DESTDIR)$(sbindir) && \
		mv mts-fpga-loader ../../sbin/mts-fpga-loader-1_5
	rmdir $(DESTDIR)$(sbindir)