-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (30 loc) · 970 Bytes
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
# General Makefile for small C programs
# Based on one by Alexender Hiam in Jan 2013
# Jim Mahoney | Jan 2016 | Public Domain
############################################################
# Modify these to fit your project.
# The name of the target executable
TARGET = veranda
# Space separated list of all source files
SOURCES = single_lvl2_main.c single_lvl2_source.c
# Space separated directories containing source files
INCLUDE_DIRS =
# Compiler flags (e.g. optimization, links, etc.):
CFLAGS = -O2 -g -Wall
# Compiler:
CC = gcc
############################################################
# You probably won't need to change this part.
# Append -I to each include dir
INCLUDES = $(foreach dir, $(INCLUDE_DIRS), -I$(dir))
# Create list of the object files
OBJECTS = $(SOURCES:.c=.o)
all: $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) -o $(TARGET)
make clean
%.o: %.c
echo "\nCompiling $<"
$(CC) -c $(CFLAGS) -o $@ $<
clean:
echo "\nCleaning"
rm -f *.o *.d