follow-up for Makefile.nmake

This commit is contained in:
nhmall
2024-11-16 10:45:22 -05:00
parent 21b495f835
commit 7932497450
+25 -14
View File
@@ -466,8 +466,12 @@ PDCURSES_CURSES_H = $(PDCURSES_TOP)\curses.h
PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)\curspriv.h PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)\curspriv.h
PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H) PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H)
PDCSRC = $(PDCURSES_TOP)\pdcurses PDCSRC = $(PDCURSES_TOP)\pdcurses
!IF "$(CURSES_CONSOLE)" == "Y"
PDCWINCON = $(PDCURSES_TOP)\wincon PDCWINCON = $(PDCURSES_TOP)\wincon
!ENDIF
!IF "$(CURSES_GRAPHICAL)" == "Y"
PDCWINGUI = $(PDCURSES_TOP)\wingui PDCWINGUI = $(PDCURSES_TOP)\wingui
!ENDIF
PDCDEP = $(PDCURSES_TOP)\curses.h PDCDEP = $(PDCURSES_TOP)\curses.h
PDCCOMMONOBJS = $(OPDC)addch.o $(OPDC)addchstr.o $(OPDC)addstr.o $(OPDC)attr.o $(OPDC)beep.o \ PDCCOMMONOBJS = $(OPDC)addch.o $(OPDC)addchstr.o $(OPDC)addstr.o $(OPDC)attr.o $(OPDC)beep.o \
@@ -481,15 +485,17 @@ PDCCOMMONOBJS = $(OPDC)addch.o $(OPDC)addchstr.o $(OPDC)addstr.o $(OPDC)attr.o $
$(OPDC)scroll.o $(OPDC)slk.o $(OPDC)termattr.o $(OPDC)touch.o \ $(OPDC)scroll.o $(OPDC)slk.o $(OPDC)termattr.o $(OPDC)touch.o \
$(OPDC)util.o $(OPDC)window.o $(OPDC)util.o $(OPDC)window.o
PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC)
!IF "$(CURSES_CONSOLE)" == "Y"
PDCINCLCON = /I$(PDCWINCON)
PDCWINCONOBJS = $(OPDCC)pdcclip.o $(OPDCC)pdcdisp.o $(OPDCC)pdcgetsc.o \ PDCWINCONOBJS = $(OPDCC)pdcclip.o $(OPDCC)pdcdisp.o $(OPDCC)pdcgetsc.o \
$(OPDCC)pdckbd.o $(OPDCC)pdcscrn.o $(OPDCC)pdcsetsc.o $(OPDCC)pdcutil.o $(OPDCC)pdckbd.o $(OPDCC)pdcscrn.o $(OPDCC)pdcsetsc.o $(OPDCC)pdcutil.o
!ENDIF
!IF "$(CURSES_GRAPHICAL)" == "Y"
PDCWINGUIOBJS = $(OPDCG)pdcclip.o $(OPDCG)pdcdisp.o $(OPDCG)pdcgetsc.o \ PDCWINGUIOBJS = $(OPDCG)pdcclip.o $(OPDCG)pdcdisp.o $(OPDCG)pdcgetsc.o \
$(OPDCG)pdckbd.o $(OPDCG)pdcscrn.o $(OPDCG)pdcsetsc.o $(OPDCG)pdcutil.o $(OPDCG)pdckbd.o $(OPDCG)pdcscrn.o $(OPDCG)pdcsetsc.o $(OPDCG)pdcutil.o
PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC)
PDCINCLGUI = /I$(PDCWINCON) PDCINCLGUI = /I$(PDCWINCON)
PDCINCLCON = /I$(PDCWINGUI) !ENDIF
!ELSE !ELSE
PDCDEP= PDCDEP=
PDCCOMMONOBJS= PDCCOMMONOBJS=
@@ -627,14 +633,14 @@ CURSESOBJ= $(OTTY)cursdial.o $(OTTY)cursinit.o $(OTTY)cursinvt.o \
!IF "$(CURSES_CONSOLE)" == "Y" !IF "$(CURSES_CONSOLE)" == "Y"
CURSESWINCONOBJS = $(CURSESOBJ) CURSESWINCONOBJS = $(CURSESOBJ)
PDCWINCONLIB = $(LIBDIR)\$(PDCDIST)-wincon-$(TARGET_CPU)-static.lib PDCWINCONLIB = $(LIBDIR)\$(PDCDIST)-wincon-$(TARGET_CPU)-static.lib
CURSESDEF1=-D"CURSES_GRAPHICS" -DPDC_NCMOUSE CURSESCONDEF1=-D"CURSES_GRAPHICS" -DPDC_NCMOUSE
#CURSESDEF2=-D"CURSES_BRIEF_INCLUDE" -DCHTYPE_32 #CURSESDEF2=-D"CURSES_BRIEF_INCLUDE" -DCHTYPE_32
CURSESDEF2=-DCURSES_UNICODE $(PDCURSESFLAGS) CURSESDEF2=-DCURSES_UNICODE $(PDCURSESFLAGS)
!ENDIF !ENDIF
!IF "$(CURSES_GRAPHICAL)" == "Y" !IF "$(CURSES_GRAPHICAL)" == "Y"
CURSESWINGUIOBJS = $(CURSESOBJ) $(OGUI)guitty.o CURSESWINGUIOBJS = $(CURSESOBJ) $(OGUI)guitty.o
PDCWINGUILIB = $(LIBDIR)\$(PDCDIST)-wingui-$(TARGET_CPU)-static.lib PDCWINGUILIB = $(LIBDIR)\$(PDCDIST)-wingui-$(TARGET_CPU)-static.lib
CURSESDEF1=-D"CURSES_GRAPHICS" -DPDC_NCMOUSE CURSESGUIDEF1=-D"CURSES_GRAPHICS" -DPDC_NCMOUSE
#CURSESDEF2=-D"CURSES_BRIEF_INCLUDE" -DCHTYPE_32 #CURSESDEF2=-D"CURSES_BRIEF_INCLUDE" -DCHTYPE_32
CURSESDEF2=-DCURSES_UNICODE $(PDCURSESFLAGS) CURSESDEF2=-DCURSES_UNICODE $(PDCURSESFLAGS)
!ENDIF !ENDIF
@@ -661,7 +667,7 @@ OGUIHACKLIB = $(OGUI)hacklib-$(TARGET_CPU)-static.lib
# - TTY # - TTY
# #
TTYDEF= -D"_CONSOLE" -DWIN32CON $(CURSESDEF1) TTYDEF= -D"_CONSOLE" -DWIN32CON $(CURSESCONDEF1) $(CURSESGUIDEF1)
RANDOMTTY = $(OTTY)random.o RANDOMTTY = $(OTTY)random.o
MDLIBTTY = $(OTTY)mdlib.o MDLIBTTY = $(OTTY)mdlib.o
@@ -720,7 +726,7 @@ ALLOBJTTY = $(SOBJTTY) $(DLBOBJTTY) $(OBJSTTY) $(VVOBJTTY) $(LUAOBJTTY)
# - GUI # - GUI
# #
GUIDEF= -DTILES -DMSWIN_GRAPHICS -DNOTTYGRAPHICS $(CURSESDEF1) GUIDEF= -DTILES -DMSWIN_GRAPHICS -DNOTTYGRAPHICS $(CURSESGUIDEF1)
ALL_GUIHDR = $(MSWIN)\mhaskyn.h $(MSWIN)\mhdlg.h $(MSWIN)\mhfont.h \ ALL_GUIHDR = $(MSWIN)\mhaskyn.h $(MSWIN)\mhdlg.h $(MSWIN)\mhfont.h \
$(MSWIN)\mhinput.h $(MSWIN)\mhmain.h $(MSWIN)\mhmap.h $(MSWIN)\mhmenu.h \ $(MSWIN)\mhinput.h $(MSWIN)\mhmain.h $(MSWIN)\mhmap.h $(MSWIN)\mhmenu.h \
@@ -1312,10 +1318,8 @@ DLB =
#========================================== #==========================================
# Rules for files in win\curses # Rules for files in win\curses
#========================================== #==========================================
!IF "$(ADD_CURSES)" == "Y"
{$(WCURSES)}.c{$(OBJTTY)}.o: {$(WCURSES)}.c{$(OBJTTY)}.o:
$(Q)$(CC) $(PDCINCL) $(CFLAGS) $(CURSESDEF1) $(CURSESDEF2) $(TTYDEF) $(GUIDEF) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< $(Q)$(CC) $(PDCINCL) $(CFLAGS) $(CURSESCONDEF1) $(CURSESGUIDEF1) $(CURSESDEF2) $(TTYDEF) $(GUIDEF) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
!ENDIF
#========================================== #==========================================
# Rules for files in PDCurses # Rules for files in PDCurses
@@ -1329,12 +1333,16 @@ DLB =
{$(PDCSRC)}.c{$(OBJPDC)}.o: {$(PDCSRC)}.c{$(OBJPDC)}.o:
$(Q)$(CC) /wd4244 /wd4267 /wd4774 $(PDCINCL) $(CFLAGS:-w44774= ) $(CURSESDEF2) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< $(Q)$(CC) /wd4244 /wd4267 /wd4774 $(PDCINCL) $(CFLAGS:-w44774= ) $(CURSESDEF2) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
!IF "$(CURSES_CONSOLE)" == "Y"
{$(PDCWINCON)}.c{$(OBJPDCC)}.o: {$(PDCWINCON)}.c{$(OBJPDCC)}.o:
$(Q)$(CC) /wd4244 /wd4267 /wd4774 $(PDCINCL) $(PDCINCLCON) $(CFLAGS) $(CURSESDEF2) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< $(Q)$(CC) /wd4244 /wd4267 /wd4774 $(PDCINCL) $(PDCINCLCON) $(CFLAGS) $(CURSESDEF2) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
!ENDIF
!IF "$(CURSES_GRAPHICAL)" == "Y"
{$(PDCWINGUI)}.c{$(OBJPDCG)}.o: {$(PDCWINGUI)}.c{$(OBJPDCG)}.o:
$(Q)$(CC) /wd4244 /wd4267 /wd4774 $(PDCINCL) $(PDCINCLGUI) $(CFLAGS) $(CURSESDEF2) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $< $(Q)$(CC) /wd4244 /wd4267 /wd4774 $(PDCINCL) $(PDCINCLGUI) $(CFLAGS) $(CURSESDEF2) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
!ENDIF !ENDIF
!ENDIF
#========================================== #==========================================
# Rules for LUA files # Rules for LUA files
@@ -1791,8 +1799,11 @@ pkgdir.tag:
envchk.tag: cpu.tag envchk.tag: cpu.tag
!IFDEF TTYOBJ !IFDEF TTYOBJ
@echo tty window support included @echo tty window support included
! IF "$(ADD_CURSES)" == "Y" ! IF "$(CURSES_CONSOLE)" == "Y"
@echo curses window support also included @echo curses console window support also included
! ENDIF
! IF "$(CURSES_GRAPHICAL)" == "Y"
@echo curses graphical window support also included
! ENDIF ! ENDIF
!ENDIF !ENDIF
! IF "$(CL)"!="" ! IF "$(CL)"!=""
@@ -2053,7 +2064,7 @@ $(PDCWINCONLIB) : $(PDCCOMMONOBJS) $(PDCWINCONOBJS)
@echo Building library $@ from $** @echo Building library $@ from $**
@$(librarian) -nologo /out:$@ $(PDCCOMMONOBJS) $(PDCWINCONOBJS) @$(librarian) -nologo /out:$@ $(PDCCOMMONOBJS) $(PDCWINCONOBJS)
!ENDIF !ENDIF
!IF "$(CURSES_CONSOLE)" == "Y" !IF "$(CURSES_GRAPHICAL)" == "Y"
$(PDCWINGUILIB) : $(PDCCOMMONOBJS) $(PDCWINGUIOBJS) $(PDCWINGUILIB) : $(PDCCOMMONOBJS) $(PDCWINGUIOBJS)
@echo Building library $@ from $** @echo Building library $@ from $**
@$(librarian) -nologo /out:$@ $(PDCCOMMONOBJS) $(PDCWINGUIOBJS) @$(librarian) -nologo /out:$@ $(PDCCOMMONOBJS) $(PDCWINGUIOBJS)