\hush\examples\drawtool\makefile.mak

DrawTool make file

Main target
    all: drawtool
Target platform
    WIN32=1
Global definitions
    !include ..\resource.mak
No command printing
    .SILENT
Macro definitions
    TARGETNAME = drawtool
    OBJS = tablet.obj drawtool.obj file_chooser.obj main.obj
Now that all macros have been defined, we can tell what the real main target is
    drawtool: $(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) { $< }