Changeset 261


Ignore:
Timestamp:
Aug 16, 2005, 5:39:49 PM (20 years ago)
Author:
root
Message:

Rework resource kit support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/makefile

    r220 r261  
    88# 24 May 05 SHL Add clean and cleanobj targets
    99# 06 Jun 05 SHL Add warnings enable (WARN)
     10# 24 Jul 05 SHL Rework resource kit support
    1011
    1112# Warning - missing many *.h dependencies
     
    2425RC = rc
    2526
    26 !IFNDEF DEBUG
     27!ifndef DEBUG
    2728DEBUG = 0
    28 !ENDIF
    29 
    30 !IFNDEF WARN
     29!endif
     30
     31# Define WARN for more warnings
     32
     33!ifndef WARN
    3134CFLAGS =  /G5 /Ge- /Gm+ /Gs- /Gt- /Mp /O- /Q+ /Sp4 /Ss /Ti+ /W3
    3235!ELSE
     
    3740CFLAGSW = /Wcmp /Wcnd- /Wcns /Wcnv- /Weff /Wext- /Wini /Wobs /Wpor /Wpro /Wrea /Wret /Wtrd- /Wuni- /Wuse
    3841CFLAGS =  /G5 /Ge- /Gm+ /Gs- /Gt- /Mp /O- /Q+ /Sp4 /Ss /Ti+ /W3 $(CFLAGSW)
    39 !ENDIF
    40 
    41 # Enable this for more warnng
     42!endif
    4243
    4344# for fm3res only
     
    4849!ELSE
    4950LFLAGS = /ALIGN:4 /EXEPACK /MAP /NOI /NOE
    50 !ENDIF
    51 
     51!endif
     52
     53!ifndef MAKERES
    5254.c.obj:
    5355  $(CC) $(CFLAGS) /C $*.c
     56!else
     57  # !error "MAKERES mode"
     58!endif
    5459
    5560OFILES= mainwnd.obj dircnrs.obj valid.obj filldir.obj error.obj\
     
    7479LFILES3=$(OFILES3:.obj=)
    7580
    76 ALL: FM3DLL.DLL \
    77      FM3RES.RES \
    78      FM3RES.DLL \
    79      FM3DLL.LIB \
    80      FM3RES.LIB \
    81      ipf\FM3.HLP \
     81!ifndef MAKERES
     82
     83all: $(BASE).dll \
     84     $(BASERES).res \
     85     $(BASERES).dll \
     86     $(BASE).lib \
     87     $(BASERES).lib \
     88     ipf\fm3.hlp \
    8289     internal\mkstr.exe \
    8390     fm3res.str
    8491
    8592$(BASE).dll: $(OFILES) $(OFILES2) $(OFILES3) $(BASE).def
    86     @REM @<<$(BASE).@0
    87     $(LFLAGS)
    88     /OUT:$@
    89     $(OFILES)
    90     $(OFILES2)
    91     $(OFILES3)
    92     $(BASE).def
     93  @$(LINK) @<<$(BASE).lrf
     94  $(LFLAGS)
     95  /LI
     96  /OUT:$@
     97  $(OFILES)
     98  $(OFILES2)
     99  $(OFILES3)
     100  $(BASE).def
    93101<<
    94     @rem type $(BASE).@0
    95     $(LINK) @$(BASE).@0
     102  @rem type $(BASE).lrf
     103  bldlevel $@
    96104
    97105$(BASE).lib: $(BASE).dll $(BASE).def
    98     IMPLIB $(BASE).lib $(BASE).def
     106  implib $(BASE).lib $(BASE).def
     107
     108!else
     109
     110# Just resources
     111
     112all: chkexe \
     113     $(BASERES).res \
     114     $(BASERES).dll \
     115     ipf\fm3.hlp \
     116     fm3res.str
     117
     118chkexe:
     119  @echo Checking required EXEs
     120  if not exist internal\mkstr.exe internal\mkstr.exe
     121  lxlite -c:exehdr internal\mkstr.exe >nul
     122
     123!endif
     124
     125# Update resources only
     126
     127res:
     128  @echo Updating resources only
     129  $(MAKE) /nologo /$(MAKEFLAGS) MAKERES=1
    99130
    100131init.c: $(BASE).h version.h
     
    104135internal\mkstr.exe: internal\mkstr.c version.h fm3str.h
    105136  cd internal
    106   compile2 mkstr.c
     137  $(MAKE) /nologo /$(MAKEFLAGS)
    107138  cd..
    108139
     
    110141  $(CC) $(CFLAGSR) /C $(BASERES).c
    111142
    112 $(BASERES).res: $*.rc $*.dlg fm3dlg.h icons\*.ico
     143$(BASERES).res: *.rc *.dlg fm3dll2.h fm3dlg.h icons\*.ico icons\*.ptr
    113144  $(RC) -r $*
    114145
    115 $(BASERES).DLL: $(BASERES).RES $(BASERES).OBJ $(BASERES).DEF
    116     @REM @<<$(BASERES).@0
    117     $(LFLAGS)
    118     /OUT:$@
    119     $(BASERES).obj
    120     $(BASERES).def
     146!ifndef MAKERES
     147
     148$(BASERES).dll: $(BASERES).res $(BASERES).obj $(BASERES).def
     149  @REM @<<$(BASERES).@0
     150  $(LFLAGS)
     151  /OUT:$@
     152  $(BASERES).obj
     153  $(BASERES).def
    121154<<
    122     type $(BASERES).@0
    123     $(LINK) @$(BASERES).@0
    124     $(RC) -x2 $(BASERES).res $(BASERES).dll
    125     :: SHL ea /d /e:.ICON /V $(BASERES).dll
     155  type $(BASERES).@0
     156  $(LINK) @$(BASERES).@0
     157  $(RC) -x2 $(BASERES).res $@
     158  :: SHL ea /d /e:.ICON /V $@
     159  bldlevel $@
     160
     161!else
     162
     163$(BASERES).dll: $(BASERES).res
     164  @if not exist $@ echo $@ missing
     165  lxlite $@ /x+ /b-
     166  lxlite $@ /c:minstub
     167  $(RC) -x2 $(BASERES).res $@
     168  lxlite $@ /x- /b-
     169  bldlevel $@
     170
     171!endif
    126172
    127173$(BASERES).lib: $(BASERES).dll $(BASERES).def
    128     IMPLIB $(BASERES).lib $(BASERES).def
    129 
    130 $(BASERES).str: $(BASE).STR fm3str.h version.h icons\*.ico
    131     internal\mkstr
    132     copy $(BASERES).str .. /v
    133     cd ..\reskit
    134     makekit
    135     cd..\dll
    136 
    137 ipf\FM3.hlp: ipf\*.ipf
    138     cd ipf
    139     ipfc /CODEPAGE=850 fm3.ipf
    140     cd..
     174  implib $(BASERES).lib $(BASERES).def
     175
     176$(BASERES).str: $(BASE).str fm3str.h version.h icons\*.ico
     177  internal\mkstr
     178  copy $(BASERES).str .. /v
     179
     180ipf\FM3.hlp: ipf\*.ipf ipf\bitmaps\*.bmp
     181  cd ipf
     182  ipfc /CODEPAGE=850 fm3.ipf
     183  ren fm3.HLP fm3.hlp
     184  cd..
    141185
    142186avv.obj:      version.h
     
    145189
    146190cleanobj:
     191  cd internal
     192  $(MAKE) /nologo /$(MAKEFLAGS) cleanobj
     193  cd..
    147194  -del *.obj
    148195
    149196clean:
     197  cd internal
     198  $(MAKE) /nologo /$(MAKEFLAGS) clean
     199  cd..
    150200  -del *.dll
    151201  -del *.lib
Note: See TracChangeset for help on using the changeset viewer.