$(WINDRES) $< -O coff -o $@
examples:
- $(MAKE) -C ./fetch CC=$(CC)
- $(MAKE) -C ./interactive CC=$(CC)
- $(MAKE) -C ./pop3-list CC=$(CC)
- $(MAKE) -C ./w3b CC=$(CC)
+ $(MAKE) -C ./fetch CC=$(CC) SUFFIX=$(SUFFIX)
+ $(MAKE) -C ./interactive CC=$(CC) SUFFIX=$(SUFFIX)
+ $(MAKE) -C ./pop3-list CC=$(CC) SUFFIX=$(SUFFIX)
+ $(MAKE) -C ./w3b CC=$(CC) SUFFIX=$(SUFFIX)
install:
- $(MAKE) -C ./fetch CC=$(CC) PREFIX=$(PREFIX) install
- $(MAKE) -C ./interactive CC=$(CC) PREFIX=$(PREFIX) install
- $(MAKE) -C ./pop3-list CC=$(CC) PREFIX=$(PREFIX) install
- $(MAKE) -C ./w3b CC=$(CC) PREFIX=$(PREFIX) install
+ $(MAKE) -C ./fetch CC=$(CC) PREFIX=$(PREFIX) SUFFIX=$(SUFFIX) install
+ $(MAKE) -C ./interactive CC=$(CC) PREFIX=$(PREFIX) SUFFIX=$(SUFFIX) install
+ $(MAKE) -C ./pop3-list CC=$(CC) PREFIX=$(PREFIX) SUFFIX=$(SUFFIX) install
+ $(MAKE) -C ./w3b CC=$(CC) PREFIX=$(PREFIX) SUFFIX=$(SUFFIX) install
clean:
rm -f *.o *.so *.core *~ *.exe *.res
- $(MAKE) -C ./fetch clean
- $(MAKE) -C ./interactive clean
- $(MAKE) -C ./pop3-list clean
- $(MAKE) -C ./w3b clean
+ $(MAKE) -C ./fetch SUFFIX=$(SUFFIX) clean
+ $(MAKE) -C ./interactive SUFFIX=$(SUFFIX) clean
+ $(MAKE) -C ./pop3-list SUFFIX=$(SUFFIX) clean
+ $(MAKE) -C ./w3b SUFFIX=$(SUFFIX) clean
# $Id$:
.PHONY: clean install
-./fetch: ./fetch.c $(RESFILE)
+./fetch$(SUFFIX): ./fetch.c $(RESFILE)
$(CC) -g -o $@ -I ../../Library -L ../../Library $^ -lw3
../libw3.res:
# $Id$
.PHONY: clean install
-./interactive: ./interactive.o $(RESFILE)
+./interactive$(SUFFIX): ./interactive.o $(RESFILE)
$(CC) -g -o $@ -L ../../Library $^ -lw3
./%.o: ./%.c
# $Id$
.PHONY: clean install
-./pop3-list: ./pop3-list.o $(RESFILE)
+./pop3-list$(SUFFIX): ./pop3-list.o $(RESFILE)
$(CC) -g -o $@ -L ../../Library $^ -lw3
./%.o: ./%.c
# $Id$
.PHONY: clean install
-./w3b: ./w3b.o $(RESFILE)
+./w3b$(SUFFIX): ./w3b.o $(RESFILE)
$(CC) -g -o $@ -L ../../Library $^ -lw3
./%.o: ./%.c
sprintf(seq, "\x1b[1;%dH", termw - strlen(titlebuf != NULL ? titlebuf : "No title") - 1);
#ifdef __MINGW32__
DWORD written = 0;
- WriteConsole(winstdout, seq, strlen(seq), &written, NULL);
+ char* str = malloc(strlen(seq) + 512);
+ sprintf(str, "%s\x1b[7m %s \x1b[m", seq, titlebuf != NULL ? titlebuf : "No title");
+ WriteConsole(winstdout, str, strlen(str), &written, NULL);
+ free(str);
#else
printf("%s\x1b[7m %s \x1b[m", seq, titlebuf != NULL ? titlebuf : "No title");
fflush(stdout);
$(MAKE) -C ./Library CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" WINDOWS=YES
./Example: ./Library/w3.dll
- $(MAKE) -C ./Example CC=$(CC) examples
+ $(MAKE) -C ./Example CC=$(CC) examples SUFFIX=.exe
./Library/W3Version.h:
m4 -DSUFFIX=\"W\" ./W3Version.h.p > $@