Mail Archives: djgpp/1993/01/20/01:57:51
> From: Rick Wagner <WAGNER AT main DOT mndly DOT umn DOT edu>
> Date: 19 Jan 93 16:18:21 CST
> X-Pmrqc: 1
> Priority: normal
> X-Mailer: Pegasus Mail v2.3 (R5).
> I'm new to DJGPP and this list and I've been watching for mention of a
> faq for this list. So far nothing :(. Is there is faq (besides the one
> that comes with djgpp)?
> I have two questions besides this.
> 1) How can I change stin/out to be unbuffered (if its possible)?
This changes stdin and stdout to be unbuffered when they are tty's
if (isatty(1))
(void)setvbuf(stdout, (char *)0, _IONBF, 0);
if (isatty(0) && isatty(1)) {
(void)setvbuf(stdin, (char *)0, _IONBF, 0);
> 2) How do you use makefiles with djgpp? I can easily compile everything
> seperately and work great but I can't figure out how to get gcc to use a
> makefile.
In the same way that in UNIX, but changing $(CC). You must create a file
called "makefile" (see below) and execute "make".
HS = f1.h f2.h f3.h etc...
SRCS = f1.c f2.c f3.c etc...
OBJS = f1.o f2.o f3.o etc...
TOOL = example
TRGT = $(TOOL).exe
CC = gcc
.SUFFIXES : .o
.c.o:
$(CC) $(CFLAGS) -c $<
CFLAGS = -g
$(TRGT): $(OBJS)
$(CC) $(CFLAGS) -o $(TOOL) *.o
aout2exe $(TOOL)
$(OBJS): $(HS)
clean:
del *.o
del $(TOOL)
> Thanks
> Rick Wagner
Santiago
- Raw text -