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
SRC = upper.c NAME = upper CFLAGS += -W -Wall -g LDFLAGS += OBJ = $(SRC:c=o) RM = rm -f CC = gcc $(NAME): $(OBJ) $(CC) -o $(NAME) $(CFLAGS) $(LDFLAGS) $(OBJ) chmod u+x $(NAME) cp $(NAME) ~/bin clean: $(RM) *.swp $(RM) $(OBJ) $(RM) *.c~ *.h~ pdfclean: $(RM) *.pdf $(RM) *.ps fclean: clean pdfclean $(RM) $(NAME) re: fclean $(NAME) clean