Replaced elaborate install logic with just a bunch of symlinks.
Maybe I'm naive but even after thinking about it for quite some time I can't see why it should hurt to just build the cc65 binaries from the sources "in place" and have 'make install' simply create some symlinks in usr/local/bin. The new Makfile builds the binaries with builtin search paths matching their build location. So the symlinks in usr/local/bin allow to allow to use them out-of-the-box without additional environment variables.
This commit is contained in:
24
src/Makefile
24
src/Makefile
@@ -28,7 +28,29 @@ mostlyclean:
|
||||
clean: mostlyclean
|
||||
$(RM) -r ../bin
|
||||
|
||||
.PHONY: all $(PROGS) mostlyclean clean
|
||||
install: all
|
||||
$(foreach prog,$(PROGS),$(INSTALL_recipe))
|
||||
|
||||
uninstall:
|
||||
$(foreach prog,$(PROGS),$(UNINSTALL_recipe))
|
||||
|
||||
.PHONY: all $(PROGS) mostlyclean clean install uninstall
|
||||
|
||||
##########
|
||||
|
||||
define INSTALL_recipe =
|
||||
|
||||
ln -s $(abspath ../bin/$(prog)) /usr/local/bin/$(prog)
|
||||
|
||||
endef
|
||||
|
||||
##########
|
||||
|
||||
define UNINSTALL_recipe =
|
||||
|
||||
$(RM) /usr/local/bin/$(prog)
|
||||
|
||||
endef
|
||||
|
||||
##########
|
||||
|
||||
|
||||
Reference in New Issue
Block a user