blob: 4990099ff17004e2be84087cd57593661f36fb3e (
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
31
32
33
|
### Application-specific constants
APP_NAME := util_ack
### Constant symbols
CC := $(CROSS_COMPILE)gcc
AR := $(CROSS_COMPILE)ar
CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I.
OBJDIR = obj
### General build targets
all: $(APP_NAME)
clean:
rm -f $(OBJDIR)/*.o
rm -f $(APP_NAME)
### Main program compilation and assembly
$(OBJDIR):
mkdir -p $(OBJDIR)
$(OBJDIR)/%.o: src/%.c | $(OBJDIR)
$(CC) -c $(CFLAGS) $< -o $@
$(APP_NAME): $(OBJDIR)/$(APP_NAME).o
$(CC) $< -o $@
### EOF
|