| 1 | <?xml version="1.0" ?> |
|---|
| 2 | <!-- |
|---|
| 3 | Adds 'dll-def-file' tag to dll and module targets: |
|---|
| 4 | |
|---|
| 5 | Sample usage: |
|---|
| 6 | <dll ...> |
|---|
| 7 | ... |
|---|
| 8 | <dll-def-file>src/foodll/foodll.def</dll-def-file> |
|---|
| 9 | </dll> |
|---|
| 10 | Useful when you don't want to clutter old code with __declspec(dllexport). |
|---|
| 11 | |
|---|
| 12 | Works with: |
|---|
| 13 | autoconf, msvs2003prj |
|---|
| 14 | |
|---|
| 15 | Should work with: |
|---|
| 16 | borland, mingw, msvc6prj,msvs2005prj,msvs2008prj |
|---|
| 17 | |
|---|
| 18 | Author Zbigniew Zagorski <z.zagorski@gmail.com> |
|---|
| 19 | --> |
|---|
| 20 | <makefile> |
|---|
| 21 | <define-tag name="dll-def-file" rules="dll,module"> |
|---|
| 22 | <if cond="FORMAT in ('msvc,msvc6prj,msvs2003prj,msvs2005prj,msvs2008prj')"> |
|---|
| 23 | <ldflags>/DEF:$(SRCDIR)/$(value)</ldflags> |
|---|
| 24 | </if> |
|---|
| 25 | <if cond="FORMAT=='mingw'"> |
|---|
| 26 | <ldflags>-Wl,--disable-auto-import $(SRCDIR)/$(value)</ldflags> |
|---|
| 27 | </if> |
|---|
| 28 | <if cond="FORMAT=='borland'"> |
|---|
| 29 | <ldflags>$(nativePaths(SRCDIR + DIRSEP + value))</ldflags> |
|---|
| 30 | </if> |
|---|
| 31 | <if cond="FORMAT=='autoconf'"> |
|---|
| 32 | <set var="__link_deffile"> |
|---|
| 33 | <if cond="PLATFORM_WIN32=='1'">-Wl,--disable-auto-import $(srcdir)/$(value)</if> |
|---|
| 34 | </set> |
|---|
| 35 | <ldflags>$(__link_deffile)</ldflags> |
|---|
| 36 | </if> |
|---|
| 37 | </define-tag> |
|---|
| 38 | </makefile> |
|---|
| 39 | |
|---|