@ -62,18 +62,16 @@ endif
i f e q ( $( PORTNAME ) , c y g w i n )
i f e q ( $( PORTNAME ) , c y g w i n )
postgres : $( OBJS ) postgres .def libpostgres .a
postgres : $( OBJS )
$( DLLTOOL) --dllname $@ $( X) --output-exp $@ .exp --def postgres.def
$( CC) $( CFLAGS) $( LDFLAGS) $( LDFLAGS_EX) $( export_dynamic) -Wl,--stack,$( WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib= libpostgres.a $( call expand_subsys,$^) $( LIBS) -o $@
$( CC) $( CFLAGS) $( LDFLAGS) $( LDFLAGS_EX) -o $@ $( X) -Wl,--base-file,$@ .base $@ .exp $( call expand_subsys,$( OBJS) ) $( LIBS)
$( DLLTOOL) --dllname $@ $( X) --base-file $@ .base --output-exp $@ .exp --def postgres.def
$( CC) $( CFLAGS) $( LDFLAGS) $( LDFLAGS_EX) -Wl,--stack,$( WIN32_STACK_RLIMIT) -o $@ $( X) $@ .exp $( call expand_subsys,$( OBJS) ) $( LIBS)
rm -f $@ .exp $@ .base
postgres.def : $( OBJS )
# There is no correct way to write a rule that generates two files.
$( DLLTOOL) --export-all --output-def $@ $( call expand_subsys,$^)
# Rules with two targets don't have that meaning, they are merely
# shorthand for two otherwise separate rules. To be safe for parallel
# make, we must chain the dependencies like this. The semicolon is
# important, otherwise make will choose some built-in rule.
libpostgres.a : postgres .def
libpostgres.a : postgres ;
$( DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
e n d i f # cygwin
e n d i f # cygwin
@ -295,7 +293,7 @@ clean:
$( top_builddir) /src/include/utils/fmgroids.h \
$( top_builddir) /src/include/utils/fmgroids.h \
$( top_builddir) /src/include/utils/probes.h
$( top_builddir) /src/include/utils/probes.h
i f e q ( $( PORTNAME ) , c y g w i n )
i f e q ( $( PORTNAME ) , c y g w i n )
rm -f postgres.dll postgres.def libpostgres.a
rm -f postgres.dll libpostgres.a
e n d i f
e n d i f
i f e q ( $( PORTNAME ) , w i n 3 2 )
i f e q ( $( PORTNAME ) , w i n 3 2 )
rm -f postgres.dll postgres.def libpostgres.a $( WIN32RES)
rm -f postgres.dll postgres.def libpostgres.a $( WIN32RES)