-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile.in
117 lines (92 loc) · 2.87 KB
/
Makefile.in
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#
# Copyright 2005-2014 Hayaki Saito <[email protected]>
#
# ##### BEGIN GPL LICENSE BLOCK #####
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ##### END GPL LICENSE BLOCK #####
CC=@CC@
RC=@RC@ -O coff
CC64=@CC64@
RC64=@RC64@ -O coff
ZIP=@ZIP@
TAR=@TAR@
CP=cp
RM=rm -f
SCP=scp
MKDIR=mkdir -p
OBJ=.@OBJEXT@
EXE=@EXEEXT@
DLL=.dll
TARGETS+= $(PROGRAM)$(EXE) $(PROGRAM)$(DLL)
ifneq (x@CC64@,x)
ifneq (x@RC64@,x)
TARGETS+= $(PROGRAM)64surrogate$(EXE) $(PROGRAM)64$(DLL)
endif
endif
CFLAGS=-O2 -fno-strict-aliasing -fno-exceptions \
-Wall -Wextra -Werror
PROGRAM=haisyo
LIBS=
PACKAGE=@PACKAGE_NAME@-@PACKAGE_VERSION@
ARCHIVE=$(PACKAGE).tar.gz
.PHONY: all build run dist clean upload
all: build
build: $(TARGETS)
run: build
cygstart ./$(PROGRAM)@EXEEXT@
clean:
$(RM) *$(OBJ) *$(EXE) *$(DLL) *.res *.RES *.exp *.lib *.log
$(RM) *.zip *.tar.gz
$(RM) -r @PACKAGE_NAME@-*
distclean: clean
$(RM) -r autom4te.cache config.status Makefile
main.o: main.c
$(CC) $(CFLAGS) -c $< -o $@
main64.o: main.c
$(CC64) $(CFLAGS) -c $< -o $@
$(PROGRAM)$(OBJ): haisyo.c
$(CC) $(CFLAGS) -c $< -o $@
$(PROGRAM)64$(OBJ): haisyo.c
$(CC64) $(CFLAGS) -c $< -o $@
$(PROGRAM)$(DLL): $(PROGRAM)$(OBJ)
$(CC) $(CFLAGS) -shared -o $@ $< $(LIBS)
$(PROGRAM)64$(DLL): $(PROGRAM)64$(OBJ)
$(CC64) $(CFLAGS) -shared -o $@ $< $(LIBS)
$(PROGRAM).res$(OBJ): $(PROGRAM).rc
$(RC) $< -o $@
$(PROGRAM)64.res$(OBJ): $(PROGRAM).rc
$(RC64) $< -o $@
$(PROGRAM)$(EXE): main$(OBJ) $(PROGRAM)$(DLL) $(PROGRAM).res$(OBJ)
$(CC) -mwindows $(CFLAGS) -o $@ $^ $(LIBS)
$(PROGRAM)64surrogate$(EXE): main64$(OBJ) $(PROGRAM)64$(DLL) $(PROGRAM)64.res$(OBJ)
$(CC64) -mwindows $(CFLAGS) -o $@ $^ $(LIBS)
dist: clean build
$(RM) $@
$(RM) -r $(PACKAGE)
$(MKDIR) $(PACKAGE)/src
$(CP) COPYING.txt README.md $(PACKAGE)
$(CP) *$(EXE) *$(DLL) $(PACKAGE)
$(CP) *.c *.h *.rc *.def *.ico *.bmp .travis.yml .gitignore $(PACKAGE)/src
$(CP) *.mk Makefile.in configure config.h.in $(PACKAGE)/src/
$(TAR) cz $(PACKAGE) > $(PACKAGE).tar.gz
test -n "$(ZIP)" && $(ZIP) -r $(PACKAGE).zip $(PACKAGE)
upload: dist
$(SCP) $(PACKAGE).tar.gz zuse:/var/www/misc/@[email protected]
$(SCP) $(PACKAGE).zip zuse:/var/www/misc/@[email protected]
$(SCP) $(TARGETS) zuse:/var/www/misc/
configure: configure.ac
autoconf
Makefile: Makefile.in configure
./configure
Makefile.in: clean