101 lines
2.4 KiB
Makefile
101 lines
2.4 KiB
Makefile
|
|
#
|
|
# NMAKE makefile for building TRACE32 Remote API sample programs
|
|
#
|
|
# Please use Microsoft Visual Studio NMAKE
|
|
#
|
|
# Select e.g. "Start > All Programs > Microsoft Visual Studio 2015 > Visual Studio Tools >
|
|
# Visual Studio Command Prompt(2015)" in order to open a shell for compiling the various
|
|
# demo applications. Recommended lib for linking: \Microsoft SDKs\Windows\v7.0A\Lib\User32.Lib
|
|
#
|
|
#
|
|
# $Id: makefile 146693 2022-04-07 16:08:37Z hlohn $
|
|
# $LastChangedRevision: 146693 $
|
|
# $LastChangedBy: hlohn $
|
|
#
|
|
# (c) Lauterbach GmbH
|
|
#
|
|
|
|
|
|
!IF EXIST(release)||EXIST(debug)
|
|
CLEAN = rd /S /Q
|
|
!IF EXIST(release)
|
|
CLEAN = $(CLEAN) release
|
|
!ENDIF
|
|
!IF EXIST(debug)
|
|
CLEAN = $(CLEAN) debug
|
|
!ENDIF
|
|
!ELSE
|
|
CLEAN = @echo nothing to clean
|
|
!ENDIF
|
|
|
|
!IF "$(PLATFORM)"=="X86"
|
|
SUBSYS = /subsystem:CONSOLE,5.01
|
|
!ELSE
|
|
SUBSYS = /subsystem:CONSOLE,5.02
|
|
!ENDIF
|
|
|
|
!IFDEF DEBUG
|
|
OF = debug
|
|
CFLAGS = /Od /Zi /Fd"$(OF)\vc80.pdb" /DDEBUG
|
|
LFLAGS = $(SUBSYS) /nologo /DEBUG
|
|
!ELSE
|
|
OF = release
|
|
CFLAGS = /Gd /Ot
|
|
LFLAGS = $(SUBSYS) /nologo
|
|
!ENDIF
|
|
|
|
CC = cl /c /Gs /w44996 /W3 -I"../src" /nologo
|
|
SEARCH = {.;..\src}
|
|
|
|
help:
|
|
@echo. nmake help ................... show this help
|
|
@echo. nmake rel .................... build all executables (release version)
|
|
@echo. nmake dbg .................... build all executables (debug version)
|
|
@echo. nmake all .................... same as "nmake rel"
|
|
@echo. nmake clean .................. delete working directories .\release and .\debug
|
|
@echo.
|
|
|
|
EXEFILES = $(OF)\t32rem.exe $(OF)\t32remtest.exe $(OF)\t32apicmd.exe $(OF)\t32apinotify.exe $(OF)\t32fdxhost.exe
|
|
RCLOBJS = $(OF)\hremote.obj $(OF)\hlinknet.obj $(OF)\t32nettcp.obj $(OF)\tcpsimple2.obj
|
|
|
|
!IF EXISTS(t32_arc_sim_test.c)
|
|
TARGETS= $(TARGETS) $(OF)\t32_arc_sim_test.exe
|
|
!ENDIF
|
|
|
|
!IFDEF DEBUG
|
|
APITARGETS = $(EXEFILES:debug\=)
|
|
!ELSE
|
|
APITARGETS = $(EXEFILES:release\=)
|
|
!ENDIF
|
|
|
|
clean:
|
|
$(CLEAN)
|
|
|
|
all: $(APITARGETS)
|
|
|
|
rel: all
|
|
|
|
dbg:
|
|
nmake DEBUG=1 /NOLOGO all
|
|
|
|
$(OF):
|
|
md $@
|
|
|
|
# the next rule allows to build an arbitrary executable also without the ".exe" prefix e.g. "nmake t32rem"
|
|
$(APITARGETS:.exe=) : $(@B).exe
|
|
|
|
$(APITARGETS) : $(OF)\$(@B).exe .phony
|
|
copy $(OF)\$(@B).exe $(@B).exe
|
|
|
|
$(EXEFILES) : $(OF)\$(@B).obj $(RCLOBJS)
|
|
link $(LFLAGS) /out:"$@" $** ws2_32.lib
|
|
|
|
$(EXEFILES:.exe=.obj) : $(@B).c $(SEARCH)t32.h makefile $(OF)
|
|
$(CC) $(CFLAGS) /Fo$@ %s -DENABLE_NOTIFICATION
|
|
|
|
$(RCLOBJS) : $(SEARCH)$(@B).c $(SEARCH)t32.h makefile $(OF)
|
|
$(CC) $(CFLAGS) /Fo$@ %s -DENABLE_NOTIFICATION
|
|
|
|
.phony:
|