Code: Select all | Expand
# Microsoft VS2022 make sample, (c) FiveTech Software 2022
# Rutas de herramientas y librerías
HBDIR=c:\harbour_msvc
FWDIR=c:\fwh
VCDIR=c:\vc2022\bin32
.SUFFIXES: .prg .c .obj .rc .res
PRG = \
prg\one.PRG \
prg\two.PRG \
prg\three.PRG
OBJ=$(PRG:.PRG=.obj)
OBJS=$(OBJ:prg\=obj\)
# Crear directorio obj si no existe
!IF ![if not exist obj mkdir obj]
!ENDIF
PROJECT: one.EXE
# Enlace final
one.exe : $(OBJS) one.res
echo $(OBJS) > msvc.tmp
@echo Vinculando...
@echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib > msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrtl.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbvm.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\gtgui.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hblang.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbmacro.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbrdd.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddntx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddcdx.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\rddfpt.lib >> msvc.tmp
@echo $(HBDIR)\lib\win\msvc\hbsix.lib >> msvc.tmp
@echo kernel32.lib >> msvc.tmp
@echo user32.lib >> msvc.tmp
@echo gdi32.lib >> msvc.tmp
@echo winspool.lib >> msvc.tmp
@echo comctl32.lib >> msvc.tmp
@echo comdlg32.lib >> msvc.tmp
@echo advapi32.lib >> msvc.tmp
@echo shell32.lib >> msvc.tmp
@echo ole32.lib >> msvc.tmp
@echo oleaut32.lib >> msvc.tmp
@echo uuid.lib >> msvc.tmp
@echo odbc32.lib >> msvc.tmp
@echo odbccp32.lib >> msvc.tmp
@echo iphlpapi.lib >> msvc.tmp
@echo mpr.lib >> msvc.tmp
@echo version.lib >> msvc.tmp
@echo wsock32.lib >> msvc.tmp
@echo msimg32.lib >> msvc.tmp
@echo oledlg.lib >> msvc.tmp
@echo psapi.lib >> msvc.tmp
@echo gdiplus.lib >> msvc.tmp
@echo winmm.lib >> msvc.tmp
@echo ws2_32.lib >> msvc.tmp
IF EXIST one.res echo one.res >> msvc.tmp
$(VCDIR)\link @msvc.tmp /nologo /subsystem:windows /force:multiple > link.log
@type link.log
one.res : one.rc
$(VCDIR)\rc.exe -r -d__FLAT__ one.rc
# Regla explícita para construir obj\*.obj desde prg\*.prg
{prg\}.prg{obj\}.obj:
$(HBDIR)\bin\harbour $< /n /w /o$@ /i$(FWDIR)\include;$(HBDIR)\include
$(VCDIR)\cl.exe -TP -W3 -c /GS- /I$(HBDIR)\include /GA -Fo$@ $*.c