Advertisement
Guest User

primitive makefile for compiling "hello" C program

a guest
Mar 2nd, 2014
130
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.34 KB | None
  1. .PHONY: install uninstall clean run auto autoinstall
  2.  
  3. # vars
  4.  
  5. NAME = hello
  6. INSTALL = /home/Administrator
  7.  
  8. # macro
  9.  
  10. auto: $(NAME).exe install clean
  11.  
  12. # commands
  13.  
  14. $(NAME).exe: $(NAME).c
  15.     gcc $(NAME).c -o $(NAME).exe
  16.  
  17. install:
  18.     cp $(NAME).exe "$(INSTALL)"
  19.  
  20. uninstall:
  21.     rm -f "$(INSTALL)/$(NAME).exe"
  22.  
  23. clean:
  24.     rm -f $(NAME).exe
Advertisement
RAW Paste Data Copied
Advertisement