DATE := $(HEXDATE)
endif
-all: $(BTARGET) $(ITARGET) samples memdisk
+BSUBDIRS = memdisk win32
+ISUBDIRS = sample com32
+
+all: $(BTARGET) $(ITARGET)
+ for i in $(BSUBDIRS) $(ISUBDIRS) ; do $(MAKE) -C $$i $@ ; done
ls -l $(BTARGET) $(ITARGET) memdisk/memdisk
-installer: $(ITARGET) samples
+installer: $(ITARGET)
+ $(MAKE) -C $(ISUBDIRS) all
ls -l $(BTARGET) $(ITARGET)
-.PHONY: samples
-samples:
- $(MAKE) -C sample all
-
-.PHONY: memdisk
-memdisk:
- $(MAKE) -C memdisk all
-
version.gen: version version.pl
$(PERL) version.pl version
rm -f $(OBSOLETE)
tidy: local-tidy
- $(MAKE) -C memdisk tidy
- $(MAKE) -C win32 tidy
- $(MAKE) -C sample tidy
+ for i in $(BSUBDIRS) $(ISUBDIRS) ; do $(MAKE) -C $$i $@ ; done
local-clean:
rm -f $(ITARGET)
clean: local-tidy local-clean
- $(MAKE) -C sample clean
- $(MAKE) -C memdisk clean
- $(MAKE) -C win32 clean
+ for i in $(BSUBDIRS) $(ISUBDIRS) ; do $(MAKE) -C $$i $@ ; done
dist: tidy
for dir in . sample memdisk ; do \
rm -f $(BTARGET) .depend *.so.*
spotless: local-clean dist local-spotless
- $(MAKE) -C sample spotless
- $(MAKE) -C memdisk spotless
- $(MAKE) -C win32 spotless
+ for i in $(BSUBDIRS) $(ISUBDIRS) ; do $(MAKE) -C $$i $@ ; done
.depend:
rm -f .depend
{
size_t gap = nmemb;
size_t i, j;
- void *p1, *p2;
+ char *p1, *p2;
int swapped;
do {
gap = newgap(gap);
swapped = 0;
- for ( i = 0, p1 = base ; i < nmemb-gap ; i++, (char *)p1 += size ) {
+ for ( i = 0, p1 = base ; i < nmemb-gap ; i++, p1 += size ) {
j = i+gap;
if ( compar(p1, p2 = (char *)base+j*size) > 0 ) {
memswap(p1, p2, size);