-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (28 loc) · 1.07 KB
/
Makefile
File metadata and controls
33 lines (28 loc) · 1.07 KB
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
31
32
###############################################################################
#
# File Name : Makefile
# Created By : Thomas AUREL
# Creation Date : November 25th, 2014
# Last Change : March 2th, 2015 at 08:36:31
# Last Changed By : Thomas Aurel
# Purpose : It's allow to compile our project easier
# - all : Compile all source presents
# - clean : Clean all objects and executable
#
###############################################################################
#### INITIAL PARAMETERS ####
EXECUTABLE= my_printf
SOURCES= main.c my_math.c my_libc.c my_string.c my_stdio.c my_string.1.c my_stdio.1.c error.c my_stdio.2.c
# CFLAGS= -Wall -Werror -ansi -pedantic -std=c99 # version for linux
CFLAGS= -Wall -Werror -pedantic -std=c99 # version for OSX
LDFLAGS=
CC=gcc
OBJECTS=$(SOURCES:.c=.o)
#### TARGETS ####
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(EXECUTABLE) $(CFLAGS)
$(OBJECTS): $(SOURCES)
$(CC) -c $(SOURCES) $(CFLAGS)
clean:
rm $(OBJECTS) $(EXECUTABLE)