nmake
1 MAKEFILE = Makefile.vc
2
3 CFLAGS = /nologo /W3 /O1 -I./ -Icharset/ -Iwindows/ -Iunix/ -Imacosx/ /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500
4 LFLAGS = /incremental:no /fixed
5 RCFLAGS = -DWIN32 -D_WIN32 -DWINVER=0x0400
6
7 CFLAGS = $(CFLAGS) /DHAS_GSSAPI /DSECURITY_WIN32
8 RCFLAGS = $(RCFLAGS) $(VER)
9
10
11 all: hello.exe
12
13 hello.exe: hello.obj hello.rsp
14 link $(LFLAGS) $(XLFLAGS) -out:hello.exe -map:hello.map @hello.rsp
15
16
17 hello.rsp: $(MAKEFILE)
18 echo /nologo /subsystem:console > hello.rsp
19 echo hello.obj >> hello.rsp
20
21 hello.obj:
22 cl $(COMPAT) $(CFLAGS) $(XFLAGS) /c hello.c
23
24 clean: tidy
25 -del *.exe
26
27 tidy:
28 -del *.obj
29 -del *.res
30 -del *.pch
31 -del *.aps
32 -del *.ilk
33 -del *.pdb
34 -del *.rsp
35 -del *.dsp
36 -del *.dsw
37 -del *.ncb
38 -del *.opt
39 -del *.plg
40 -del *.map
41 -del *.idb
42 -del debug.log
2
3 CFLAGS = /nologo /W3 /O1 -I./ -Icharset/ -Iwindows/ -Iunix/ -Imacosx/ /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500
4 LFLAGS = /incremental:no /fixed
5 RCFLAGS = -DWIN32 -D_WIN32 -DWINVER=0x0400
6
7 CFLAGS = $(CFLAGS) /DHAS_GSSAPI /DSECURITY_WIN32
8 RCFLAGS = $(RCFLAGS) $(VER)
9
10
11 all: hello.exe
12
13 hello.exe: hello.obj hello.rsp
14 link $(LFLAGS) $(XLFLAGS) -out:hello.exe -map:hello.map @hello.rsp
15
16
17 hello.rsp: $(MAKEFILE)
18 echo /nologo /subsystem:console > hello.rsp
19 echo hello.obj >> hello.rsp
20
21 hello.obj:
22 cl $(COMPAT) $(CFLAGS) $(XFLAGS) /c hello.c
23
24 clean: tidy
25 -del *.exe
26
27 tidy:
28 -del *.obj
29 -del *.res
30 -del *.pch
31 -del *.aps
32 -del *.ilk
33 -del *.pdb
34 -del *.rsp
35 -del *.dsp
36 -del *.dsw
37 -del *.ncb
38 -del *.opt
39 -del *.plg
40 -del *.map
41 -del *.idb
42 -del debug.log
nmake -f Makefile.vc
make:
CC = clang CFLAGS = CPP = cc -E LINK = $(CC) APP = hello default: build build: hello.o c_say_hello.o $(LINK) -o $(APP) hello.o c_say_hello.o hello.o: hello.c $(CC) -c $(CFLAGS) -o hello.o hello.c c_say_hello.o: c_say_hello.c $(CC) -c $(CFLAGS) -o c_say_hello.o c_say_hello.c clean: rm -rf *.o $(APP)
make