aboutsummaryrefslogtreecommitdiff
path: root/apps/xclock
diff options
context:
space:
mode:
Diffstat (limited to 'apps/xclock')
-rw-r--r--apps/xclock/Clock.c5
-rw-r--r--apps/xclock/makefile39
2 files changed, 43 insertions, 1 deletions
diff --git a/apps/xclock/Clock.c b/apps/xclock/Clock.c
index ebbd2f6e2..6dfd9653d 100644
--- a/apps/xclock/Clock.c
+++ b/apps/xclock/Clock.c
@@ -86,6 +86,7 @@ SOFTWARE.
#include <X11/Xosdefs.h>
#include <stdio.h>
#include <X11/Xos.h>
+#include <X11\Xwinsock.h>
#include <X11/Xaw/XawInit.h>
#if !defined(NO_I18N) && defined(HAVE_ICONV)
#include <iconv.h>
@@ -112,7 +113,7 @@ SOFTWARE.
#include <locale.h>
extern Boolean no_locale; /* if True, use old (unlocalized) behaviour */
#endif
-
+#include <unistd.h>
/* Private Definitions */
@@ -130,8 +131,10 @@ extern Boolean no_locale; /* if True, use old (unlocalized) behaviour */
#define ANALOG_SIZE_DEFAULT 164
+#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
/* #define abs(a) ((a) < 0 ? -(a) : (a)) */
diff --git a/apps/xclock/makefile b/apps/xclock/makefile
new file mode 100644
index 000000000..bc89baee9
--- /dev/null
+++ b/apps/xclock/makefile
@@ -0,0 +1,39 @@
+WINAPP = xclock
+
+DEFINES += XT_NO_SM XRENDER
+
+INCLUDELIBFILES = \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \
+ $(MHMAKECONF)\libxkbfile\src\$(OBJDIR)\libxkbfile.lib \
+ $(MHMAKECONF)\libXpm\src\$(OBJDIR)\libXpm.lib \
+ $(MHMAKECONF)\libXau\$(OBJDIR)\libXau.lib \
+ $(MHMAKECONF)\libXaw\src\$(OBJDIR)\libXaw.lib \
+ $(MHMAKECONF)\libXt\src\$(OBJDIR)\libXt.lib \
+ $(MHMAKECONF)\libXext\src\$(OBJDIR)\libXext.lib \
+ $(MHMAKECONF)\libXmu\src\$(OBJDIR)\libXmu.lib \
+ $(MHMAKECONF)\libX11\$(OBJDIR)\libX11.lib \
+ $(MHMAKECONF)\libXft\src\$(OBJDIR)\libXft.lib \
+ $(MHMAKECONF)\libXrender\src\$(OBJDIR)\libXrender.lib \
+ $(MHMAKECONF)\fontconfig\src\$(OBJDIR)\libfontconfig.lib \
+ $(MHMAKECONF)\libXfont\src\util\$(OBJDIR)\libutil.lib
+
+INCLUDES += $(MHMAKECONF)\libXft\include $(MHMAKECONF)\freetype\include $(MHMAKECONF)\fontconfig
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+ifeq ($(DEBUG),1)
+LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2d.lib \
+ $(MHMAKECONF)\freetype\lib\freetype2410MT_D.lib
+else
+LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2.lib \
+ $(MHMAKECONF)\freetype\lib\freetype2410MT.lib
+endif
+
+LINKLIBS += $(MHMAKECONF)\libxml2\lib\libxml2.lib
+
+CSRCS = \
+ Clock.c \
+ xclock.c
+