17 lines
212 B
Makefile
17 lines
212 B
Makefile
# Makefile for hello.c
|
|
|
|
CC = gcc # C compiler
|
|
CFLAGS = -O2 # Compiler flags (optimization level)
|
|
|
|
main: main.o
|
|
$(CC) $(CFLAGS) -o $@ $^
|
|
|
|
main.o: main.c
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
run:
|
|
./main
|
|
|
|
clean:
|
|
rm -f *.o
|