\hush\examples\coffee\makefile.mak
Coffee make file
Main target
all: coffee
Target platform
WIN32=1
Global definitions
!include ..\resource.mak
No command printing
.SILENT
Macro definitions
TARGETNAME = COFFEE
OBJS = coffee.obj menu.obj main.obj cup.obj gui.obj help.obj
Since all macros have been defined by now, we can tell what the real main target is
coffee: $(CONFIG) $(TARGETNAME).exe cleanconfig
How to do cleanup
clean:
if exist *.exe del *.exe
if exist *.obj del *.obj
if exist *.cfg del *.cfg
if exist *.out del *.out
cleanconfig:
if exist *.cfg del *.cfg
Compiling and linking flags:
$(CONFIG):
copy &&|
-n$(OBJDIR) -I$(INCLUDES)
-D$(DEFINES)
$(CCFLAGS)
| $(CONFIG) > nul
This will tell how to build the executable.
$(TARGETNAME).exe: $(OBJS)
$(LINK) @&&|
$(LNFLAGS) $(OBJS)
$@
-x
$(LNLIBS)
|, &&|
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
|, $(LIBDIR)\hush.res
Implicit rules:
.c.obj:
$(CC) { $< }