-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (59 loc) · 1.16 KB
/
Makefile
File metadata and controls
72 lines (59 loc) · 1.16 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
###################################################
#
# Makefile for MP3Encoder
# Created: [Mon Oct 31 16:33:25 2019]
# Clark Yang
#
###################################################
#
# Macros
#
ifeq ($(OS),Windows_NT)
LAMELIB := libmp3lame.a_windows
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LAMELIB := libmp3lame.a_linux
endif
ifeq ($(UNAME_S),Darwin)
LAMELIB := libmp3lame.a_macos
endif
endif
CC = g++
CC_OPTIONS = -std=gnu++14
LNK_OPTIONS = lib/$(LAMELIB) -lpthread
#
# INCLUDE directories for MP3Encoder
#
INCLUDE = -I.\
-Iinc\
-Iencoder\
-Ifactory
#
# Build MP3Encoder
#
MP3Encoder : \
./main.o\
./encoder.o\
./factory.o
$(CC) \
./main.o\
./encoder.o\
./factory.o\
$(LNK_OPTIONS)\
-o MP3Encoder
clean :
rm \
./main.o\
./encoder.o\
./factory.o\
MP3Encoder
#
# Build the parts of MP3Encoder
#
./main.o : main.cpp
$(CC) $(CC_OPTIONS) main.cpp -c $(INCLUDE) -o ./main.o
./encoder.o : encoder/encoder.cpp
$(CC) $(CC_OPTIONS) encoder/encoder.cpp -c $(INCLUDE) -o ./encoder.o
./factory.o : factory/factory.cpp
$(CC) $(CC_OPTIONS) factory/factory.cpp -c $(INCLUDE) -o ./factory.o