-# makefile MAKE V2.0 or higher\r
-\r
+!ifdef __LINUX__\r
+REMOVECOMMAND=rm -f\r
+COPYCOMMAND=cp -f\r
+DIRSEP=/\r
+OBJ=o\r
+!else\r
+REMOVECOMMAND=del\r
+COPYCOMMAND=copy /y\r
+DIRSEP=\\r
+OBJ=obj\r
+!endif\r
\r
# Set the required model here, either s, c or l (LOWER CASE ONLY)\r
#\r
-\r
MODEL=h\r
\r
-XLIB_VERSION=06\r
+XLIB_VERSION=06w\r
\r
# Set the compiler: either BCC or TCC\r
#\r
-CC=wcc\r
+CC=wcl\r
\r
-TLIB=wlib\r
+LIB=wlib\r
\r
-AFLAGS = -0 /zi -m$(MODEL)\r
-CFLAGS = -0 -m$(MODEL)\r
-CPPFLAGS= -m$(MODEL)\r
+AFLAGS = -0 -m$(MODEL)\r
+CFLAGS = -0 -mh\r
+CPPFLAGS= -0 -m$(MODEL)\r
LDFLAGS = -m$(MODEL)\r
\r
\r
-%.o: %.c\r
- $(CC) -c $(CFLAGS) $<\r
+#%.$(OBJ): %.c\r
+# $(CC) -c $(CFLAGS) $<\r
\r
-%.o: *.asm\r
- wasm $(AFLAGS) $* \\r
+#%.$(OBJ): *.asm\r
+# wasm $(AFLAGS) $* \\r
\r
+$(OBJ)\r
\r
-XLIBOBJS= xprintf.o xpoint.o xline.o xmain.o xpal.o xpbitmap.o \\r
- xrect.o xtext.o xcbitmap.o xdetect.o xbmtools.o \\r
- xfileio.o xrletool.o xbezier.o xpbmclip.o xvbitmap.o \\r
- xmakevbm.o xmouse.o xcircle.o xclippbm.o xcomppbm.o \\r
- xpolygon.o xvsync.o xfill.o xcbitm32.o\r
\r
+XLIBOBJS= xprintf.$(OBJ) xpoint.$(OBJ) xline.$(OBJ) xmain.$(OBJ) xpal.$(OBJ) xpbitmap.$(OBJ) xrect.$(OBJ) xtext.$(OBJ) xcbitmap.$(OBJ) xdetect.$(OBJ) xbmtools.$(OBJ) xfileio.$(OBJ) xrletool.$(OBJ) xbezier.$(OBJ) xpbmclip.$(OBJ) xvbitmap.$(OBJ) xmakevbm.$(OBJ) xmouse.$(OBJ) xcircle.$(OBJ) xclippbm.$(OBJ) xcomppbm.$(OBJ) xpolygon.$(OBJ) xvsync.$(OBJ) xfill.$(OBJ) xcbitm32.$(OBJ)\r
\r
-all: demo1.exe demo2.exe demo3.exe demo4.exe demo5.exe demo6.exe demo7.exe \\r
- demo8.exe demo9.exe demo10.exe\r
\r
-demo1.exe : demo1.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo1.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+all: demo1.exe demo2.exe demo3.exe demo4.exe demo5.exe demo6.exe demo7.exe demo8.exe# demo9.exe demo10.exe\r
\r
-demo2.exe : demo2.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo2.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo1.exe : demo1.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo1.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-demo3.exe : demo3.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo3.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo2.exe : demo2.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo2.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-demo4.exe : demo4.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo4.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo3.exe : demo3.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo3.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-demo5.exe : demo5.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo5.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo4.exe : demo4.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo4.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-demo6.exe : demo6.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo6.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo5.exe : demo5.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo5.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-demo7.exe : demo7.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo7.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo6.exe : demo6.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo6.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-demo8.exe : demo8.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo8.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo7.exe : demo7.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo7.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-demo9.exe : demo9.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo9.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo8.exe : demo8.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo8.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-demo10.exe : demo10.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib\r
- $(CC) $(CFLAGS) demo10.o xlib$(XLIB_VERSION)$(MODEL).lib\r
+demo9.exe : demo9.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo9.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
+demo10.exe : demo10.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
+ $(CC) $(CFLAGS) demo10.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib\r
\r
-xlib$(XLIB_VERSION)$(MODEL).lib: $(XLIBOBJS)\r
- $(TLIB) xlib$(XLIB_VERSION)$(MODEL).lib \\r
- -+xmain -+xpoint -+xline -+xpal -+xrect -+xtext -+xprintf -+xbezier -+xfill -+xcbitm32\r
- $(TLIB) xlib$(XLIB_VERSION)$(MODEL).lib \\r
- -+xpbitmap -+xcbitmap -+xdetect -+xbmtools -+xfileio -+xrletool -+xpbmclip\r
- $(TLIB) xlib$(XLIB_VERSION)$(MODEL).lib \\r
- -+xvbitmap -+xmakevbm -+xmouse -+xcircle -+xclippbm -+xcomppbm -+xpolygon -+xvsync\r
+#\r
+# executable objects\r
+#\r
+demo1.$(OBJ) : demo1.c\r
+ $(CC) -c $(CFLAGS) demo1.c\r
+demo2.$(OBJ) : demo2.c\r
+ $(CC) -c $(CFLAGS) demo2.c\r
+demo3.$(OBJ) : demo3.c\r
+ $(CC) -c $(CFLAGS) demo3.c\r
+demo4.$(OBJ) : demo4.c\r
+ $(CC) -c $(CFLAGS) demo4.c\r
+demo5.$(OBJ) : demo5.c\r
+ $(CC) -c $(CFLAGS) demo5.c\r
+demo6.$(OBJ) : demo6.c\r
+ $(CC) -c $(CFLAGS) demo6.c\r
+demo7.$(OBJ) : demo7.c\r
+ $(CC) -c $(CFLAGS) demo7.c\r
+demo8.$(OBJ) : demo8.c\r
+ $(CC) -c $(CFLAGS) demo8.c\r
+# demo9.$(OBJ) : demo9.c\r
+# $(CC) -c $(CFLAGS) demo9.c\r
+# demo10.$(OBJ) : demo10.c\r
+# $(CC) -c $(CFLAGS) demo10.c\r
+\r
+#$(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib: $(XLIBOBJS)\r
+# $(LIB) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib \\r
+# -+xmain -+xpoint -+xline -+xpal -+xrect -+xtext -+xprintf -+xbezier -+xfill -+xcbitm32\r
+# $(LIB) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib \\r
+# -+xpbitmap -+xcbitmap -+xdetect -+xbmtools -+xfileio -+xrletool -+xpbmclip\r
+# $(LIB) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib \\r
+# -+xvbitmap -+xmakevbm -+xmouse -+xcircle -+xclippbm -+xcomppbm -+xpolygon -+xvsync\r
\r
# Object modules\r
+xprintf.$(OBJ) : xprintf.c\r
+ $(CC) -c $(CFLAGS) xprintf.c\r
+\r
+xpoint.$(OBJ) : xpoint.asm xpoint.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xpoint.asm xpoint.inc xlib.inc model.inc\r
+xline.$(OBJ) : xline.asm xline.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xline.asm xline.inc xlib.inc model.inc\r
+xmain.$(OBJ): xmain.asm xmain.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xmain.asm xmain.inc xlib.inc model.inc\r
+xpal.$(OBJ) : xpal.asm xpal.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xpal.asm xpal.inc xlib.inc model.inc\r
+xpbitmap.$(OBJ): xpbitmap.asm xpbitmap.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xpbitmap.asm xpbitmap.inc xlib.inc model.inc\r
+xpbmclip.$(OBJ): xpbmclip.asm xpbmclip.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xpbmclip.asm xpbmclip.inc xlib.inc model.inc\r
+xclippbm.$(OBJ): xclippbm.asm xclippbm.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xclippbm.asm xclippbm.inc xlib.inc model.inc\r
+xrect.$(OBJ): xpal.asm xpal.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xpal.asm xpal.inc xlib.inc model.inc\r
+xtext.$(OBJ): xtext.asm xtext.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xtext.asm xtext.inc xlib.inc model.inc\r
+xcbitmap.$(OBJ): xcbitmap.asm xcbitmap.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xcbitmap.asm xcbitmap.inc xlib.inc model.inc\r
+xcomppbm.$(OBJ): xcomppbm.asm xcomppbm.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xcomppbm.asm xcomppbm.inc xlib.inc model.inc\r
+xcbitm32.$(OBJ): xcbitm32.c\r
+ $(CC) -c $(CFLAGS) xcbitm32.c\r
+xdetect.$(OBJ) : xdetect.asm xdetect.inc model.inc\r
+ $(CC) -c $(CFLAGS) xdetect.asm xdetect.inc model.inc\r
+xbmtools.$(OBJ): xbmtools.asm xbmtools.inc model.inc\r
+ $(CC) -c $(CFLAGS) xbmtools.asm xbmtools.inc model.inc\r
+xfileio.$(OBJ) : xfileio.asm xfileio.inc model.inc\r
+ $(CC) -c $(CFLAGS) xfileio.asm xfileio.inc model.inc\r
+xrletool.$(OBJ): xrletool.asm xrletool.inc model.inc\r
+ $(CC) -c $(CFLAGS) xrletool.asm xrletool.inc model.inc\r
+xvbitmap.$(OBJ): xvbitmap.asm xvbitmap.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xvbitmap.asm xvbitmap.inc xlib.inc model.inc\r
+xmakevbm.$(OBJ): xmakevbm.c xvbitmap.h\r
+ $(CC) -c $(CFLAGS) xmakevbm.c xvbitmap.h\r
+xmouse.$(OBJ) : xmouse.asm xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xmouse.asm xlib.inc model.inc\r
+xcircle.$(OBJ) : xcircle.asm xcircle.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xcircle.asm xcircle.inc xlib.inc model.inc\r
+xpolygon.$(OBJ): xpolygon.asm xpolygon.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xpolygon.asm xpolygon.inc xlib.inc model.inc\r
+xvsync.$(OBJ) : xvsync.asm xvsync.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xvsync.asm xvsync.inc xlib.inc model.inc\r
+xfill.$(OBJ) : xfill.asm xfill.inc xlib.inc model.inc\r
+ $(CC) -c $(CFLAGS) xfill.asm xfill.inc xlib.inc model.inc\r
\r
-xprintf.o : xprintf.c\r
-xpoint.o : xpoint.asm xpoint.inc xlib.inc model.inc\r
-xline.o : xline.asm xline.inc xlib.inc model.inc\r
-xmain.o : xmain.asm xmain.inc xlib.inc model.inc\r
-xpal.o : xpal.asm xpal.inc xlib.inc model.inc\r
-xpbitmap.o: xpbitmap.asm xpbitmap.inc xlib.inc model.inc\r
-xpbmclip.o: xpbmclip.asm xpbmclip.inc xlib.inc model.inc\r
-xclippbm.o: xclippbm.asm xclippbm.inc xlib.inc model.inc\r
-xrect.o : xpal.asm xpal.inc xlib.inc model.inc\r
-xtext.o : xtext.asm xtext.inc xlib.inc model.inc\r
-xcbitmap.o: xcbitmap.asm xcbitmap.inc xlib.inc model.inc\r
-xcomppbm.o: xcomppbm.asm xcomppbm.inc xlib.inc model.inc\r
-xcbitm32.o: xcbitm32.c \r
-xdetect.o : xdetect.asm xdetect.inc model.inc\r
-xbmtools.o: xbmtools.asm xbmtools.inc model.inc\r
-xfileio.o : xfileio.asm xfileio.inc model.inc\r
-xrletool.o: xrletool.asm xrletool.inc model.inc\r
-xvbitmap.o: xvbitmap.asm xvbitmap.inc xlib.inc model.inc\r
-xmakevbm.o: xmakevbm.c xvbitmap.h\r
-xmouse.o : xmouse.asm xlib.inc model.inc\r
-xcircle.o : xcircle.asm xcircle.inc xlib.inc model.inc\r
-xpolygon.o: xpolygon.asm xpolygon.inc xlib.inc model.inc\r
-xvsync.o : xvsync.asm xvsync.inc xlib.inc model.inc\r
-xfill.o : xfill.asm xfill.inc xlib.inc model.inc\r
+#\r
+#other~\r
+#\r
+clean: .symbolic\r
+ @$(REMOVECOMMAND) $(EXEC)\r
+ @$(REMOVECOMMAND) *.$(OBJ)\r