From: sparky4 Date: Wed, 11 Nov 2015 11:56:01 +0000 (-0600) Subject: xlib makefile is watcom friendly now~ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=95746e9799ea096a1e9197435edd1636c814fa0c;p=16.git xlib makefile is watcom friendly now~ --- diff --git a/16/xlib/demo1.c b/16/xlib/demo1.c index 0ba8c1ae..a9773556 100755 --- a/16/xlib/demo1.c +++ b/16/xlib/demo1.c @@ -7,9 +7,9 @@ #include #include #include -#include +#include #include -#include "Xlib_all.h" +#include "xlib_all.h" #define MAX_OBJECTS 10 diff --git a/16/xlib/demo2.c b/16/xlib/demo2.c index 9926e9f2..d22d1a6b 100755 --- a/16/xlib/demo2.c +++ b/16/xlib/demo2.c @@ -13,7 +13,7 @@ masked planar bitmap, and video bitmap blits. #include #include #include -#include +#include #include #include "xlib.h" #include "xcbitmap.h" diff --git a/16/xlib/demo4.c b/16/xlib/demo4.c index b91a576a..ff51d5a1 100755 --- a/16/xlib/demo4.c +++ b/16/xlib/demo4.c @@ -11,7 +11,7 @@ Demonstrates RLE encoding to file QUICK and DIRTY #include #include #include -#include +#include #include #include "xlib.h" #include "xvbitmap.h" @@ -167,4 +167,4 @@ void main(){ printf("screen size = 86400 compressed = %u",comp_size); } - \ No newline at end of file + diff --git a/16/xlib/demo5.c b/16/xlib/demo5.c index 6bc35d5f..00c6abf0 100755 --- a/16/xlib/demo5.c +++ b/16/xlib/demo5.c @@ -13,7 +13,7 @@ Themie Gouthas #include #include #include -#include +#include #include #include "xlib.h" #include "xpbitmap.h" diff --git a/16/xlib/demo8.c b/16/xlib/demo8.c index 5241eed3..6b905333 100755 --- a/16/xlib/demo8.c +++ b/16/xlib/demo8.c @@ -13,7 +13,7 @@ masked planar bitmap, and video bitmap blits. #include #include #include -#include +#include #include #include #include diff --git a/16/xlib/makefile b/16/xlib/makefile index 50064811..bb99010b 100755 --- a/16/xlib/makefile +++ b/16/xlib/makefile @@ -1,104 +1,163 @@ -# makefile MAKE V2.0 or higher - +!ifdef __LINUX__ +REMOVECOMMAND=rm -f +COPYCOMMAND=cp -f +DIRSEP=/ +OBJ=o +!else +REMOVECOMMAND=del +COPYCOMMAND=copy /y +DIRSEP=\ +OBJ=obj +!endif # Set the required model here, either s, c or l (LOWER CASE ONLY) # - MODEL=h -XLIB_VERSION=06 +XLIB_VERSION=06w # Set the compiler: either BCC or TCC # -CC=wcc +CC=wcl -TLIB=wlib +LIB=wlib -AFLAGS = -0 /zi -m$(MODEL) -CFLAGS = -0 -m$(MODEL) -CPPFLAGS= -m$(MODEL) +AFLAGS = -0 -m$(MODEL) +CFLAGS = -0 -mh +CPPFLAGS= -0 -m$(MODEL) LDFLAGS = -m$(MODEL) -%.o: %.c - $(CC) -c $(CFLAGS) $< +#%.$(OBJ): %.c +# $(CC) -c $(CFLAGS) $< -%.o: *.asm - wasm $(AFLAGS) $* \ +#%.$(OBJ): *.asm +# wasm $(AFLAGS) $* \ +$(OBJ) -XLIBOBJS= xprintf.o xpoint.o xline.o xmain.o xpal.o xpbitmap.o \ - xrect.o xtext.o xcbitmap.o xdetect.o xbmtools.o \ - xfileio.o xrletool.o xbezier.o xpbmclip.o xvbitmap.o \ - xmakevbm.o xmouse.o xcircle.o xclippbm.o xcomppbm.o \ - xpolygon.o xvsync.o xfill.o xcbitm32.o +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) -all: demo1.exe demo2.exe demo3.exe demo4.exe demo5.exe demo6.exe demo7.exe \ - demo8.exe demo9.exe demo10.exe -demo1.exe : demo1.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo1.o xlib$(XLIB_VERSION)$(MODEL).lib +all: demo1.exe demo2.exe demo3.exe demo4.exe demo5.exe demo6.exe demo7.exe demo8.exe# demo9.exe demo10.exe -demo2.exe : demo2.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo2.o xlib$(XLIB_VERSION)$(MODEL).lib +demo1.exe : demo1.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo1.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -demo3.exe : demo3.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo3.o xlib$(XLIB_VERSION)$(MODEL).lib +demo2.exe : demo2.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo2.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -demo4.exe : demo4.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo4.o xlib$(XLIB_VERSION)$(MODEL).lib +demo3.exe : demo3.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo3.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -demo5.exe : demo5.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo5.o xlib$(XLIB_VERSION)$(MODEL).lib +demo4.exe : demo4.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo4.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -demo6.exe : demo6.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo6.o xlib$(XLIB_VERSION)$(MODEL).lib +demo5.exe : demo5.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo5.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -demo7.exe : demo7.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo7.o xlib$(XLIB_VERSION)$(MODEL).lib +demo6.exe : demo6.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo6.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -demo8.exe : demo8.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo8.o xlib$(XLIB_VERSION)$(MODEL).lib +demo7.exe : demo7.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo7.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -demo9.exe : demo9.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo9.o xlib$(XLIB_VERSION)$(MODEL).lib +demo8.exe : demo8.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo8.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -demo10.exe : demo10.o $(XLIBOBJS) xlib$(XLIB_VERSION)$(MODEL).lib - $(CC) $(CFLAGS) demo10.o xlib$(XLIB_VERSION)$(MODEL).lib +demo9.exe : demo9.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo9.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib +demo10.exe : demo10.$(OBJ) $(XLIBOBJS) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib + $(CC) $(CFLAGS) demo10.$(OBJ) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib -xlib$(XLIB_VERSION)$(MODEL).lib: $(XLIBOBJS) - $(TLIB) xlib$(XLIB_VERSION)$(MODEL).lib \ - -+xmain -+xpoint -+xline -+xpal -+xrect -+xtext -+xprintf -+xbezier -+xfill -+xcbitm32 - $(TLIB) xlib$(XLIB_VERSION)$(MODEL).lib \ - -+xpbitmap -+xcbitmap -+xdetect -+xbmtools -+xfileio -+xrletool -+xpbmclip - $(TLIB) xlib$(XLIB_VERSION)$(MODEL).lib \ - -+xvbitmap -+xmakevbm -+xmouse -+xcircle -+xclippbm -+xcomppbm -+xpolygon -+xvsync +# +# executable objects +# +demo1.$(OBJ) : demo1.c + $(CC) -c $(CFLAGS) demo1.c +demo2.$(OBJ) : demo2.c + $(CC) -c $(CFLAGS) demo2.c +demo3.$(OBJ) : demo3.c + $(CC) -c $(CFLAGS) demo3.c +demo4.$(OBJ) : demo4.c + $(CC) -c $(CFLAGS) demo4.c +demo5.$(OBJ) : demo5.c + $(CC) -c $(CFLAGS) demo5.c +demo6.$(OBJ) : demo6.c + $(CC) -c $(CFLAGS) demo6.c +demo7.$(OBJ) : demo7.c + $(CC) -c $(CFLAGS) demo7.c +demo8.$(OBJ) : demo8.c + $(CC) -c $(CFLAGS) demo8.c +# demo9.$(OBJ) : demo9.c +# $(CC) -c $(CFLAGS) demo9.c +# demo10.$(OBJ) : demo10.c +# $(CC) -c $(CFLAGS) demo10.c + +#$(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib: $(XLIBOBJS) +# $(LIB) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib \ +# -+xmain -+xpoint -+xline -+xpal -+xrect -+xtext -+xprintf -+xbezier -+xfill -+xcbitm32 +# $(LIB) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib \ +# -+xpbitmap -+xcbitmap -+xdetect -+xbmtools -+xfileio -+xrletool -+xpbmclip +# $(LIB) $(XLIBOBJS)#xlib$(XLIB_VERSION)$(MODEL).lib \ +# -+xvbitmap -+xmakevbm -+xmouse -+xcircle -+xclippbm -+xcomppbm -+xpolygon -+xvsync # Object modules +xprintf.$(OBJ) : xprintf.c + $(CC) -c $(CFLAGS) xprintf.c + +xpoint.$(OBJ) : xpoint.asm xpoint.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xpoint.asm xpoint.inc xlib.inc model.inc +xline.$(OBJ) : xline.asm xline.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xline.asm xline.inc xlib.inc model.inc +xmain.$(OBJ): xmain.asm xmain.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xmain.asm xmain.inc xlib.inc model.inc +xpal.$(OBJ) : xpal.asm xpal.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xpal.asm xpal.inc xlib.inc model.inc +xpbitmap.$(OBJ): xpbitmap.asm xpbitmap.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xpbitmap.asm xpbitmap.inc xlib.inc model.inc +xpbmclip.$(OBJ): xpbmclip.asm xpbmclip.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xpbmclip.asm xpbmclip.inc xlib.inc model.inc +xclippbm.$(OBJ): xclippbm.asm xclippbm.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xclippbm.asm xclippbm.inc xlib.inc model.inc +xrect.$(OBJ): xpal.asm xpal.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xpal.asm xpal.inc xlib.inc model.inc +xtext.$(OBJ): xtext.asm xtext.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xtext.asm xtext.inc xlib.inc model.inc +xcbitmap.$(OBJ): xcbitmap.asm xcbitmap.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xcbitmap.asm xcbitmap.inc xlib.inc model.inc +xcomppbm.$(OBJ): xcomppbm.asm xcomppbm.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xcomppbm.asm xcomppbm.inc xlib.inc model.inc +xcbitm32.$(OBJ): xcbitm32.c + $(CC) -c $(CFLAGS) xcbitm32.c +xdetect.$(OBJ) : xdetect.asm xdetect.inc model.inc + $(CC) -c $(CFLAGS) xdetect.asm xdetect.inc model.inc +xbmtools.$(OBJ): xbmtools.asm xbmtools.inc model.inc + $(CC) -c $(CFLAGS) xbmtools.asm xbmtools.inc model.inc +xfileio.$(OBJ) : xfileio.asm xfileio.inc model.inc + $(CC) -c $(CFLAGS) xfileio.asm xfileio.inc model.inc +xrletool.$(OBJ): xrletool.asm xrletool.inc model.inc + $(CC) -c $(CFLAGS) xrletool.asm xrletool.inc model.inc +xvbitmap.$(OBJ): xvbitmap.asm xvbitmap.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xvbitmap.asm xvbitmap.inc xlib.inc model.inc +xmakevbm.$(OBJ): xmakevbm.c xvbitmap.h + $(CC) -c $(CFLAGS) xmakevbm.c xvbitmap.h +xmouse.$(OBJ) : xmouse.asm xlib.inc model.inc + $(CC) -c $(CFLAGS) xmouse.asm xlib.inc model.inc +xcircle.$(OBJ) : xcircle.asm xcircle.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xcircle.asm xcircle.inc xlib.inc model.inc +xpolygon.$(OBJ): xpolygon.asm xpolygon.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xpolygon.asm xpolygon.inc xlib.inc model.inc +xvsync.$(OBJ) : xvsync.asm xvsync.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xvsync.asm xvsync.inc xlib.inc model.inc +xfill.$(OBJ) : xfill.asm xfill.inc xlib.inc model.inc + $(CC) -c $(CFLAGS) xfill.asm xfill.inc xlib.inc model.inc -xprintf.o : xprintf.c -xpoint.o : xpoint.asm xpoint.inc xlib.inc model.inc -xline.o : xline.asm xline.inc xlib.inc model.inc -xmain.o : xmain.asm xmain.inc xlib.inc model.inc -xpal.o : xpal.asm xpal.inc xlib.inc model.inc -xpbitmap.o: xpbitmap.asm xpbitmap.inc xlib.inc model.inc -xpbmclip.o: xpbmclip.asm xpbmclip.inc xlib.inc model.inc -xclippbm.o: xclippbm.asm xclippbm.inc xlib.inc model.inc -xrect.o : xpal.asm xpal.inc xlib.inc model.inc -xtext.o : xtext.asm xtext.inc xlib.inc model.inc -xcbitmap.o: xcbitmap.asm xcbitmap.inc xlib.inc model.inc -xcomppbm.o: xcomppbm.asm xcomppbm.inc xlib.inc model.inc -xcbitm32.o: xcbitm32.c -xdetect.o : xdetect.asm xdetect.inc model.inc -xbmtools.o: xbmtools.asm xbmtools.inc model.inc -xfileio.o : xfileio.asm xfileio.inc model.inc -xrletool.o: xrletool.asm xrletool.inc model.inc -xvbitmap.o: xvbitmap.asm xvbitmap.inc xlib.inc model.inc -xmakevbm.o: xmakevbm.c xvbitmap.h -xmouse.o : xmouse.asm xlib.inc model.inc -xcircle.o : xcircle.asm xcircle.inc xlib.inc model.inc -xpolygon.o: xpolygon.asm xpolygon.inc xlib.inc model.inc -xvsync.o : xvsync.asm xvsync.inc xlib.inc model.inc -xfill.o : xfill.asm xfill.inc xlib.inc model.inc +# +#other~ +# +clean: .symbolic + @$(REMOVECOMMAND) $(EXEC) + @$(REMOVECOMMAND) *.$(OBJ) diff --git a/16/xlib/xrletool.h b/16/xlib/xrletool.h index 0ec859e6..52e3d31c 100755 --- a/16/xlib/xrletool.h +++ b/16/xlib/xrletool.h @@ -45,6 +45,3 @@ extern int x_file_RLDecode( /* Uncompress data file */ #endif - - - \ No newline at end of file