📄 makefile
字号:
#
# Simple IDNA client demo for
# MS VC 4+
# gcc / MingW / CygWin
#
# NB! This makefile requires GNU make
# Compile C-source as C++ for better error-checking
#
# G. Vanem <giva@bgnett.no>, March 2004
#
.SUFFIXES: .exe .obj .o
DEFINES = #-DUNICODE -D_UNICODE
LFLAGS = /debug /debugtype:both /map /subsystem:console
all:
@echo Say "make msvc" or "make gcc"
msvc: demo-1-vc.exe demo-2-vc.exe
gcc: demo-1-gcc.exe demo-2-gcc.exe
demo-1-vc.exe: idna.obj punycode.obj demo-1.obj getopt.obj
link $(LFLAGS) /out:$@ $^ ws2_32.lib
demo-2-vc.exe: idna.obj punycode.obj demo-2.obj getopt.obj
link $(LFLAGS) /out:$@ $^ ws2_32.lib
demo-1-gcc.exe: idna.o punycode.o demo-1.o
gcc $^ -s -lws2_32 -o $@
demo-2-gcc.exe: idna.o punycode.o demo-2.o
gcc $^ -s -lws2_32 -o $@
clean:
rm -f demo-*.exe *.obj *.o *.pdb
zip:: demo-1-vc.exe demo-1-gcc.exe demo-2-vc.exe demo-2-gcc.exe
strip demo*.exe
zip idna_client.zip idna.[ch] punycode.[ch] getopt.[ch] $^ Makefile *.txt
.c.obj:
cl -c $(DEFINES) -nologo -O2 -Zi -Tp $<
.cpp.obj:
cl -c $(DEFINES) -nologo -O2 -Zi $<
.c.o:
gcc -c $(DEFINES) -Wall -O2 -mno-cygwin -x c++ $<
.cpp.o:
gcc -c $(DEFINES) -Wall -O2 -mno-cygwin $<
demo-1-vc.exe: idna.obj punycode.obj getopt.obj demo-1.obj
demo-1-gcc.exe: idna.o punycode.o demo-1.o
demo-2-vc.exe: idna.obj punycode.obj getopt.obj demo-2.obj
demo-2-gcc.exe: idna.o punycode.o demo-2.o
idna.obj: idna.c idna.h punycode.h
idna.o: idna.c idna.h punycode.h
punycode.obj: punycode.c punycode.h
punycode.o: punycode.c punycode.h
demo-1.obj: demo-1.c idna.h
demo-1.o: demo-1.c idna.h
demo-2.obj: demo-2.cpp idna.h
demo-2.o: demo-2.cpp idna.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -