Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .PHONY: install uninstall clean run auto autoinstall
- # vars
- NAME = hello
- INSTALL = /home/Administrator
- # macro
- auto: run
- install: $(INSTALL)/$(NAME)
- # targets
- $(NAME): $(NAME).c
- gcc $(NAME).c -o $(NAME)
- $(INSTALL)/$(NAME): $(NAME)
- cp $(NAME) "$(INSTALL)"
- # commands
- autoinstall: $(INSTALL)/$(NAME)
- "$(INSTALL)/$(NAME)"
- run: $(NAME)
- ./$(NAME)
- uninstall:
- rm -f "$(INSTALL)/$(NAME)"
- clean:
- rm -f $(NAME)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement