-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (36 loc) · 919 Bytes
/
Makefile
File metadata and controls
50 lines (36 loc) · 919 Bytes
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
43
44
45
46
47
48
49
50
# Define the compiler to be used
CC = gcc
# Include directories
INCLUDE_DIRS = -I/usr/local/include -I/usr/local/include/pocketsphinx
# Compiler flags
CFLAGS = -Wall -Wextra ${INCLUDE_DIRS}
# Linker flags
LDFLAGS = -L/usr/local/lib -lpocketsphinx
# Name of the output executable
TARGET = live
# Source files
SRCS = live.c
# Object files
OBJS = $(SRCS:.c=.o)
ifeq ($(an4), 1)
CFLAGS += -Dan4
endif
ifeq ($(MODEL_RU), 1)
CFLAGS += -DMODEL_RU
endif
ifeq ($(MODEL_UA), 1)
CFLAGS += -DMODEL_UA
endif
ifeq ($(MODEL_DE), 1)
CFLAGS += -DMODEL_DE
endif
# Rule to build the executable
$(TARGET): clean $(OBJS)
$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LDFLAGS)
# Rule to compile source files into object files
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
# Clean rule
clean:
rm -f $(TARGET) $(OBJS)
# gcc -o live live.c -I/usr/local/include -I/usr/local/include/pocketsphinx -L/usr/local/lib -lpocketsphinx