annotate Makefile @ 3:d3e201c48ff8 draft default tip

bug fix.
author pyon
date Wed, 29 Sep 2021 22:04:51 +0900
parents c0f76f8e67fa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
1 # Makefile for wxWidgets Application
2
c0f76f8e67fa ver 1.0.0 release (add 2 items, time-limit@2022-09-30. & bug fix.)
pyon <pyon@macmini>
parents: 0
diff changeset
2 # Last Change: 2021-08-24 ‰Î 11:02:09.
0
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
3 # by Takayuki Mutoh
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
4 #
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
5
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
6 PROGNAME = iklist
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
7
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
8 ### Variables ###
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
9 OBJDIR = ./obj
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
10 CXX = g++
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
11 ARCH = 64
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
12 LOCAL = C:/msys64/home/muto/local$(ARCH)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
13 vpath %.cpp ./src
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
14 vpath %.h ./include
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
15
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
16 # For Microsoft Windows
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
17 ifdef COMSPEC
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
18 WXCXXFLAGS = -I$(LOCAL)/lib/wx/include/msw-unicode-static-3.1 -I$(LOCAL)/include/wx-3.1 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__ -mthreads
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
19 WXLIBS = -L$(LOCAL)/lib -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-3.1 -lwx_mswu_qa-3.1 -lwx_baseu_net-3.1 -lwx_mswu_html-3.1 -lwx_mswu_adv-3.1 -lwx_mswu_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu-3.1 -lwxtiff-3.1 -lwxjpeg-3.1 -lwxpng-3.1 -lwxregexu-3.1 -lwxscintilla-3.1 -lwxexpat-3.1 -lwxzlib-3.1 -lrpcrt4 -loleaut32 -lole32 -luuid -luxtheme -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lwsock32 -lgdi32 -loleacc
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
20 LIBS = $(WXLIBS) -static
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
21
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
22 EXECUTABLE = $(PROGNAME).exe
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
23
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
24 # For Apple OSX
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
25 else
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
26 WXCXXFLAGS = -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/lib/wx/include/osx_cocoa-unicode-3.1 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
27 WXLIBS = -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -lwx_osx_cocoau_xrc-3.1 -lwx_osx_cocoau_html-3.1 -lwx_osx_cocoau_qa-3.1 -lwx_osx_cocoau_adv-3.1 -lwx_osx_cocoau_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
28 LIBS = $(WXLIBS)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
29
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
30 EXECUTABLE = $(PROGNAME).app/Contents/PkgInfo
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
31
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
32 endif
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
33
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
34 CXXFLAGS = $(WXCXXFLAGS) -I./include -I./image
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
35
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
36
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
37 OBJ = $(OBJDIR)/main.o \
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
38 $(OBJDIR)/iklist.o
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
39
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
40 ifdef COMSPEC
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
41 OBJMSW = $(OBJ) $(OBJDIR)/sample_rc.o
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
42 endif
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
43
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
44
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
45 ### Targets ###
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
46
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
47 all: $(EXECUTABLE)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
48 @echo "----------------------------"
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
49 @echo " making $(ARCH) bit program "
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
50 @echo "----------------------------"
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
51
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
52 $(PROGNAME): $(OBJ) $(OBJMSW)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
53 @echo ""
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
54 @echo "=> $(EXECUTABLE) <="
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
55 $(CXX) $^ -o $@ $(LIBS)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
56
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
57 $(OBJDIR)/main.o: main.cpp main.h iklist.h
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
58 @echo ""
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
59 @echo "=> main.o <="
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
60 -mkdir -p $(OBJDIR)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
61 $(CXX) -c $< -o $@ $(CXXFLAGS)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
62
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
63 $(OBJDIR)/iklist.o: iklist.cpp iklist.h
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
64 @echo ""
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
65 @echo "=> iklist.o <="
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
66 $(CXX) -c $< -o $@ $(CXXFLAGS)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
67
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
68
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
69 # for icon
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
70 ifdef COMSPEC
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
71 $(OBJDIR)/sample_rc.o: sample.rc sample.ico
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
72 @echo ""
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
73 @echo "=> sample_rc.o <="
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
74 windres -i sample.rc -o $@ -I$(LOCAL)/include/wx-3.1
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
75 endif
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
76
2
c0f76f8e67fa ver 1.0.0 release (add 2 items, time-limit@2022-09-30. & bug fix.)
pyon <pyon@macmini>
parents: 0
diff changeset
77 # for zip
c0f76f8e67fa ver 1.0.0 release (add 2 items, time-limit@2022-09-30. & bug fix.)
pyon <pyon@macmini>
parents: 0
diff changeset
78 zip: q534list8mor p8wypswd5c0x _p8wypswd5c0x
c0f76f8e67fa ver 1.0.0 release (add 2 items, time-limit@2022-09-30. & bug fix.)
pyon <pyon@macmini>
parents: 0
diff changeset
79 zip iklist.lib q534list8mor p8wypswd5c0x _p8wypswd5c0x
c0f76f8e67fa ver 1.0.0 release (add 2 items, time-limit@2022-09-30. & bug fix.)
pyon <pyon@macmini>
parents: 0
diff changeset
80
c0f76f8e67fa ver 1.0.0 release (add 2 items, time-limit@2022-09-30. & bug fix.)
pyon <pyon@macmini>
parents: 0
diff changeset
81
0
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
82 $(EXECUTABLE): $(PROGNAME)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
83 ifdef COMSPEC
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
84 strip --strip-all $(EXECUTABLE)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
85 ./$(EXECUTABLE)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
86 else
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
87 -mkdir -p $(PROGNAME).app/Contents
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
88 -mkdir -p $(PROGNAME).app/Contents/MacOS
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
89 -mkdir -p $(PROGNAME).app/Contents/Resources
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
90
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
91 sed -e "s/IDENTIFIER/$(PROGNAME)/" \
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
92 -e "s/EXECUTABLE/$(PROGNAME)/" \
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
93 -e "s/VERSION/0.0/" \
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
94 Info.plist.in > $(PROGNAME).app/Contents/Info.plist
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
95
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
96 echo "APPL????" > $(EXECUTABLE)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
97
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
98 ln -f $(PROGNAME) $(PROGNAME).app/Contents/MacOS/$(PROGNAME)
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
99 cp -f wxmac.icns $(PROGNAME).app/Contents/Resources/wxmac.icns
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
100
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
101 open $(PROGNAME).app
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
102 endif
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
103
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
104
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
105 # clean
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
106 clean:
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
107 rm -f $(PROGNAME) $(PROGNAME).exe
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
108 rm -f $(OBJDIR)/*.o
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
109 rm -rf $(PROGNAME).app
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
110
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
111 .PHONY: all clean
520044113ef0 beta release.
pyon <pyon@macmini>
parents:
diff changeset
112