ultimatepp/uppsrc/upt/Win32dll.upt
cxl e12b5fc530 uppsrc: option for SSE2 in project templates (thanks Sender Ghost)
git-svn-id: svn://ultimatepp.org/upp/trunk@4012 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2011-10-14 08:28:12 +00:00

48 lines
925 B
Text

template "Win32 DLL project (no U++)" main;
option "Multithreaded" mt;
option "Use SSE2" sse2 = 1;
@@<:PACKAGE:>.h
#ifndef _<:PACKAGE:>_<:PACKAGE:>_h
#define _<:PACKAGE:>_<:PACKAGE:>_h
#define DllImport extern "C" __declspec(dllimport)
#define DllExport extern "C" __declspec(dllexport)
#ifdef flagDLL
#define DLLIMPORT __declspec(dllexport)
#else
#define DLLIMPORT __declspec(dllimport)
#endif
#endif
@@<:PACKAGE:>.cpp
#include <windows.h>
#include "<:PACKAGE:>.h"
BOOL APIENTRY DllMain(HANDLE hModule, DWORD reason, LPVOID lpReserved)
{
switch (reason) {
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
@@<:PACKAGE:>.upp
library(WIN32) "kernel32 user32 advapi32 shell32 winmm";
target "<:PACKAGE:>.dll";
file
<:PACKAGE:>.h,
<:PACKAGE:>.cpp;
mainconfig
"" = "DLL<:?mt:> MT<:.:><:?sse2:> SSE2<:.:>";