Skip to content

Instantly share code, notes, and snippets.

@luislavena
Created October 23, 2008 19:25
Show Gist options
  • Save luislavena/19167 to your computer and use it in GitHub Desktop.
Save luislavena/19167 to your computer and use it in GitHub Desktop.
=== modified file 'win32/shlib/Makefile'
--- old/win32/shlib/Makefile 2008-01-16 06:24:21 +0000
+++ new/win32/shlib/Makefile 2008-01-16 06:54:25 +0000
@@ -55,6 +55,7 @@
IMPORT_FLAG = -machine:x86
IMPORT_OFLAG = -out:
IMPORT_DFLAG = -def:
+MT_DLL=if exist $@.manifest mt.exe -nologo -outputresource:$@;2 -manifest $@.manifest $(ADDITIONAL_MANIFESTS)
!endif
RM = del
@@ -81,7 +82,6 @@
ETAGS = etags -tw
CTAGS = ctags -tw
-
DEFS = -DHAVE_CONFIG_H
LOCAL_DEFS = -DREADLINE_DLL -DBUILDING_DLL
@@ -104,11 +104,13 @@
# The name of the main library target.
IMPORT_READLINE = readline.lib
+IMPORT_READLINE_ALT = readline_80.lib
DEFINE_READLINE = libreadlinedl.def
-EXPORT_READLINE = readline.dll
+EXPORT_READLINE = readline_80.dll
IMPORT_HISTORY = history.lib
+IMPORT_HISTORY_ALT = history_80.lib
DEFINE_HISTORY = libhistorydl.def
-EXPORT_HISTORY = history.dll
+EXPORT_HISTORY = history_80.dll
SHARED_LIBS = $(IMPORT_READLINE) $(EXPORT_READLINE) $(IMPORT_HISTORY)
# The C code source files for this library.
@@ -159,6 +161,8 @@
$(EXPORT_READLINE): $(OBJECTS)
$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(OBJECTS) $(SHOBJ_LIBS) -Fe$@
+ $(MT_DLL)
+ $(MV) $(IMPORT_READLINE_ALT) $(IMPORT_READLINE)
$(IMPORT_HISTORY): $(DEFINE_HISTORY)
$(MAKE_IMPORT_LIB) $(IMPORT_FLAG) $(IMPORT_OFLAG)$(IMPORT_HISTORY) $(IMPORT_DFLAG)$(DEFINE_HISTORY)
@@ -169,9 +173,9 @@
force: nul
install: installdirs $(SHARED_LIBS)
- $(INSTALL_PROGRAM) readline.dll $(bindir:/=\) /Y >nul
- $(INSTALL_DATA) readline.lib $(libdir:/=\) /Y >nul
- $(INSTALL_DATA) history.lib $(libdir:/=\) /Y >nul
+ $(INSTALL_PROGRAM) $(EXPORT_READLINE) $(bindir:/=\) /Y >nul
+ $(INSTALL_DATA) $(IMPORT_READLINE) $(libdir:/=\) /Y >nul
+ $(INSTALL_DATA) $(IMPORT_HISTORY) $(libdir:/=\) /Y >nul
cd $(topdir:/=\)
for %i in ($(INSTALLED_HEADERS)) do @$(INSTALL_DATA) %i $(includedir:/=\)\readline /y >nul
@@ -184,11 +188,11 @@
uninstall:
for %i in ($(INSTALLED_HEADERS)) do @del $(includedir:/=\)\readline\%i >nul
cd $(bindir:/=\)
- $(RM) readline.dll
- $(RM) history.dll
+ $(RM) $(EXPORT_READLINE)
+ $(RM) $(EXPORT_HISTORY)
cd $(libdir:/=\)
- $(RM) readline.lib
- $(RM) history.lib
+ $(RM) $(IMPORT_READLINE)
+ $(RM) $(IMPORT_HISTORY)
install-shared: installdirs shared
-( cd shlib ; $(MAKE) $(MFLAGS) install )
@@ -201,6 +205,7 @@
clean: force
if exist *.obj $(RM) *.obj
+ if exist *.manifest $(RM) *.manifest
if exist *.exp $(RM) *.exp
if exist *.tds $(RM) *.tds
if exist *~ $(RM) *~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment