-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
executable file
·59 lines (48 loc) · 1.79 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#AddmusicK Makefile
#Please unzip src.zip first before using this makefile.
#For Mac and Linux, should work with a standard issue G++
#For Windows, you need MinGW_w64 to compile. Project files exist to compile
#this program under Visual Studio 2019 inside src.zip as an alternative
#method for compiling this program.
#NOTE: C++17 support is recommended to ensure your program compiles
#successfully!
#Use Visual Studio 2019 instead to compile AMKGUI (there is no Mac/Linux
#version at this time unless you're using Wine or some other emulation
#layer)
ifeq ($(OS),Windows_NT)
#Windows setting (made for MinGW, though in hindsight this may be a bad call)...
CXX = x86_64-w64-mingw32-g++
else
CXX = g++
endif
CXXFLAGS = -Wall -pedantic -std=c++17 -Os
#Commented out for now
#with libboost (this specifically targets MacPorts inclusions)
#CXXFLAGS += -I/opt/local/include
ifeq ($(OS),Windows_NT)
#Windows setting...
LDFLAGS = -static -static-libgcc -static-libstdc++ -s
else
#Mac/Linux setting...
LDFLAGS = -ldl
endif
#Commented out for now
#with libboost (this specifically targets MacPorts inclusions)
#LDFLAGS += -L /opt/local/lib/ -lboost_system -lboost_filesystem
SRCS = src/AddmusicK/*.cpp src/AddmusicK/asardll.c src/AM405Remover/AddMusic.cpp
AM4SRCS = src/AM4Batch/*.cpp
AMMSRCS = src/AMMBatch/*.cpp
all: addmusick
addmusick: $(SRCS) src/AddmusicK/*.h
cd src/AddmusicK; \
$(CXX) $(CXXFLAGS) -c $(patsubst %,../../%,$(SRCS))
$(CXX) -o AddmusicK src/AddmusicK/*.o $(LDFLAGS)
cd src/AM4Batch; \
$(CXX) $(CXXFLAGS) -c $(patsubst %,../../%,$(AM4SRCS))
$(CXX) -o AM4Batch src/AM4Batch/*.o $(LDFLAGS)
cd src/AMMBatch; \
$(CXX) $(CXXFLAGS) -c $(patsubst %,../../%,$(AMMSRCS))
$(CXX) -o AMMBatch src/AMMBatch/*.o $(LDFLAGS)
clean:
rm -rf src/AddmusicK/*.o ./addmusick ./AM4Batch ./AMMBatch
.PHONY: all clean