mirror of
https://github.com/xboot/xfel.git
synced 2024-11-23 17:53:31 +08:00
Makefile: add DESTDIR and PREFIX to replace hardcoded install pathname
This commit is contained in:
parent
b457ded5c1
commit
4c803c9149
13
Makefile
13
Makefile
@ -2,6 +2,7 @@
|
||||
# Top makefile
|
||||
#
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
CROSS ?=
|
||||
|
||||
AS := $(CROSS)gcc -x assembler-with-cpp
|
||||
@ -64,15 +65,15 @@ $(CPPOBJS) : %.o : %.cpp
|
||||
@$(CXX) $(CXXFLAGS) -MD -MP -MF $@.d $(INCDIRS) -c $< -o $@
|
||||
|
||||
install:
|
||||
install -Dm0755 xfel /usr/local/bin/xfel
|
||||
install -Dm0644 99-xfel.rules /etc/udev/rules.d/99-xfel.rules
|
||||
install -Dm0644 LICENSE /usr/share/licenses/xfel/LICENSE
|
||||
install -Dm0755 xfel $(DESTDIR)$(PREFIX)/bin/xfel
|
||||
install -Dm0644 99-xfel.rules $(DESTDIR)/lib/udev/rules.d/99-xfel.rules
|
||||
install -Dm0644 LICENSE $(DESTDIR)$(PREFIX)/share/licenses/xfel/LICENSE
|
||||
udevadm control --reload
|
||||
|
||||
uninstall:
|
||||
rm -f /usr/local/bin/xfel
|
||||
rm -f /etc/udev/rules.d/99-xfel.rules
|
||||
rm -f /usr/share/licenses/xfel/LICENSE
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/xfel
|
||||
rm -f $(DESTDIR)/lib/udev/rules.d/99-xfel.rules
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/licenses/xfel/LICENSE
|
||||
udevadm control --reload
|
||||
|
||||
clean:
|
||||
|
Loading…
Reference in New Issue
Block a user