-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (37 loc) · 1.07 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
# This one Makefile works with Microsoft nmake and GNU make.
# They use different conditional syntax, but each can be
# nested and inverted within the other.
all: default
ifdef MAKEDIR: # gmake: false; nmake: unused target
!ifdef MAKEDIR # gmake: not seen; nmake: true
#
# Microsoft nmake
#
RM = del /Q /F
CXX = cl.exe
CXXFLAGS = -nologo -W3 -O2 -D_UNICODE -DUNICODE
OUT = -Fe
!else # and now the other
else
#
# GNU make
#
RM = rm -f
CXX := x86_64-w64-mingw32-g++
CXXFLAGS := -Wall -Wextra -O3
LDFLAGS := -static -s
LIBS := -lole32 -luuid
OUT = -o
ifeq ($(ENABLE_UTF8),)
CXXFLAGS += -D_UNICODE -DUNICODE -municode
endif
endif # gmake: close condition; nmake: not seen
!endif : # gmake: unused target; nmake close conditional
# default target for both
default: mkshortcut.exe shortcutinfo.exe
clean:
$(RM) *.exe *.o *.obj
mkshortcut.exe: mkshortcut.cpp
$(CXX) $(CXXFLAGS) mkshortcut.cpp $(OUT)mkshortcut.exe $(LDFLAGS) $(LIBS)
shortcutinfo.exe: shortcutinfo.cpp
$(CXX) $(CXXFLAGS) shortcutinfo.cpp $(OUT)shortcutinfo.exe $(LDFLAGS) $(LIBS)