summaryrefslogtreecommitdiff
path: root/src/c/sizeof/Makefile
blob: d6e2bf1cc69edd6a04719c72ee9405de8866bf2b (plain)
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
28
29
30
# Minimal Makefile to compile main.c into an executable named main

# Compiler
CC = gcc


# Flags
CFLAGS = -Wall -Wextra -O2


# Default target
# Tells make what dependencies to compile
all: main


# Dependency 'main'
# main.c is the source file
main: main.c
	$(CC) $(CFLAGS) -o main main.c


# Test target 
test: main
	@echo -n "main.c test............................"
	@./main >/dev/null 2>&1 && echo "OK" || echo "FAILED"


# Clean target
clean:
	rm -f main