-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCLSeek.nmak
136 lines (116 loc) · 3.18 KB
/
CLSeek.nmak
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#
# makefile for CLSeek (for Microsoft NMAKE)
#
# !!!!!!!!! USER DATA !!!!!!! (macro names must *not* be changed)
# target of the final executable w/o .exe (e.g. md5c.exe)
#
TARGET=CLSeek
MYICON=Binoculars1b.ico
# !!!!!!!!! USER DATA !!!!!!! (macro names must *not* be changed)
# extra compiler and linker flags
#
USR_CFLAGS= -I. -DSTDC_HEADERS=1 -DHAVE_STRING_H=1
USR_LDFLAGS=
USR_LIBS=$(LIBtd)
#
LIBtd=$(CFG)/libtd.lib
# !!!!!!!!! USER DATA !!!!!!! (macro names must *not* be changed)
# list of dependent objects (in INTDIR)
# these MUST be properly defined!!!
#
OBJS=\
!IF "$(MYICON)" != ""
$(INTDIR)\$(TARGET).res \
!ENDIF
$(INTDIR)\$(TARGET).obj
# !!!!!!!!! USER DATA !!!!!!! (macro names must *not* be changed)
# specify output and intermidiate directories
#
!IF "$(OUTDIR)" == ""
OUTDIR=$(CFG) # output directory
!ENDIF
INTDIR=$(CFG) # intermediate directory
# --- include common setting ---
#
# NOTE: This include file must be between ALL directives and macro
# definitions AND ALL description blocks because the very FIRST
# target is defined inside.
#
!IF EXISTS("nmake.setup")
!INCLUDE "nmake.setup"
!ELSEIF EXIST("..\..\make\nmake.setup")
!INCLUDE "..\..\make\nmake.setup"
!ELSE
!ERROR Warning: cannot find "nmake.setup"
!ENDIF
#
# ---
default: all
ALL : "$(OUTDIR)\$(TARGET).exe"
# build target executable
# LINK32_FLAGS is defined in nmake.setup
"$(OUTDIR)\$(TARGET).exe" : $(OUTDIR) $(USR_LIBS) $(OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(OBJS) $(USR_LIBS)
<<
rm -f $(CFG)/vc60.*
!IF "$(CFG)" == "Debug"
cp -fv $(CFG)/$(TARGET).pdb $(CFG)/vc60.pdb
!ENDIF
!IF "$(MYICON)" != ""
$(INTDIR)\$(TARGET).res: $(TARGET).res
mv -fv $** $@
$(TARGET).rc: $(MYICON)
@echo // Icon > $@
@echo 101 ICON DISCARDABLE "$**" >> $@
!ENDIF
# building required libraries...
# assumptions:
# 1. $(LIBname) directories are sibling directories
# 2. nmakefile is named $(LIBname).nmak
#
lib:
# cd ../$(LIBname)
!IF "$(LIBname)" != ""
nmake -nologo -f $(LIBname).nmak CFG=$(CFG)
!ENDIF
$(LIBtd): dummy
nmake -nologo -f $(TARGET).nmak CFG=$(CFG) LIBname=libtd lib
!IF "$(CFG)" == "Release"
# delete only in Release mode
rm -f $(CFG)/vc60.*
!ENDIF
lib-CLEAN:
nmake -f $(LIBname).nmak CFG=$(CFG) CLEAN
# these are extra files that generated by MSVC
# (Debug build has more files...)
#
VCEXTRA=$(INTDIR)\vc60.idb $(OUTDIR)\$(TARGET).pch
!IF "$(CFG)" == "Debug"
VCEXTRA=$(VCEXTRA) $(INTDIR)\vc60.pdb
VCMISC=$(OUTDIR)\$(TARGET).ilk $(OUTDIR)\$(TARGET).pdb
!ENDIF
# there are extra files generated by MSVC which defined in
# $(VCEXTRA) - both Release and Debug builds
# $(VCMISC) - Debug build
CLEAN :
-$(DEL) $(OUTDIR)\$(TARGET).exe
-$(DEL) $(OBJS)
-$(DEL) $(VCEXTRA)
!IF "$(CFG)" == "Debug"
-$(DEL) $(VCMISC)
!ENDIF
nmake -f $(TARGET).nmak CFG=$(CFG) LIBname=libtd lib-CLEAN
CLEAN-ALL :
nmake -f $(TARGET).nmak CFG=Debug CLEAN
nmake -f $(TARGET).nmak CFG=Release CLEAN
_RELEASE :
nmake -f $(TARGET).nmak CFG=Release
dummy:
# dummy target
# !!!!!!!!! USER DATA !!!!!!!
# header dependency (optional)
#
CLSeek.c: dirinfo.h
dirinfo.c: dirinfo.h mygetopt.h
mygetopt.c: mygetopt.h