Skip to content

Instantly share code, notes, and snippets.

@javawolfpack
Created September 25, 2019 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javawolfpack/b44065b86bfb794c046c6383d170c322 to your computer and use it in GitHub Desktop.
Save javawolfpack/b44065b86bfb794c046c6383d170c322 to your computer and use it in GitHub Desktop.
Two Target Makefile
VERSION = 1
hello = ./hello
hello2 = ./hello2
CC = gcc
CXX = g++
CFLAGS = -Wall -O -g
FILES = $(hello) $(hello2)
all: $(FILES)
hello:
$(CC) $(CFLAGS) -o hello hello.c
hello2:
$(CC) $(CFLAGS) -O1 -o hello2 hello.c
clean:
rm -f $(FILES) *.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment