You should check the following make properties and see an example below:
- $ @ - means the name of the current target file, in which case it corresponds to the APP value.
- $ <- means one file, which is newer than the target on which the target depends.
- $? - , , , .
.SUFFIXES: .cpp.exe
CPP = cl
EXTRAFLAGS =
CPPFLAGS = /Od /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /nologo /ZI /TP /errorReport:prompt
FILES = Exercise35
APP = Exercise35.exe
.cpp.exe:
$(CPP) $(EXTRAFLAGS) $(CPPFLAGS) /c $<
all : $(APP)
$(APP) : $(FILES)
$(CPP) $(EXTRAFLAGS) $(CPPFLAGS) $@ $(FILES)
clobber : clean mrproper
clean:
del $(FILES)
mrproper:
del $(APP)
makefile, , make "" , / make,
make EXTRAFLAGS="/D _DDEBUG"
make _DDEBUG, , EXTRAFLAGS .
Edit:
, , , exe , ... makefile AIX ( Linux ...) !
, ,
,
.