[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new to make (GNU make on NT 4.0)
From: |
SMP/R&D |
Subject: |
new to make (GNU make on NT 4.0) |
Date: |
Wed, 4 Apr 2001 08:14:24 +0200 |
Hi
I've got a perhaps Stupid question, but I hope some one will help me any way
;-) (and I hope that this is the way to ask questions about make!?!)
I've just started to look at make jobs, and I though that I should use GNU
make, as this support most platforms, all though that I don't know much
about UNIX.
I'm using GNU make 3.79 on windows NT 4.0 sp 5 and a Borland C 3.1 compiler.
I through that I should start wit a small and simple "make file", with just
2 source files, and 1 header file. My problem is that often when I tries to
recompile, it's only one of the source files that gets compiled (I've
deleted the all obj, and exe files first). If I then run the compiler again,
the last source file gets compiled, and the .exe file gets linked. I also
noticed that if I write exit in the command prompt, it seams like there
still is some compilation running, like the make job started to compile both
source files at once. So I tried to use the "-job=1" as argument to the make
job, but it doesn't seams to help at all?!? What am I doing wrong?
I've also tried the Borland Make, but could not get the "include" to work,
so if anybody knows how to do this with Borland Make, I'll be happy.
I start the make job like this:
make -f makefile --jobs=1 -k
--------------------------------makefile------------------------------------
-------------------
include scr.mak
program_name = ctest
TLIB = tlib
TLINK = c:\\borlandc\\bin\\tlink
LIBPATH = C:\\BORLANDC\\LIB
INCLUDEPATH = C:\\BORLANDC\\INCLUDE
scr_wo_ext = $(scr:.c=)
obj = $(scr:.c=.obj)
CC = c:\\borlandc\\bin\\BCC
CFLAGS = -I$(INCLUDEPATH)
%.obj : %.c
@echo now compiling $< to $@
$(CC) $(CFLAGS) -c $<
$(program_name) : $(obj)
$(TLINK) /v/x/cs/P-/L$(LIBPATH) c0s.obj $(obj), $(program_name),,
emu.lib maths.lib cs.lib
.PHONY : clean
clean:
del $(obj)
del $(program_name).exe
include depn
--------------------------------scr.mak-------------------------------------
------------------
scr = \
cunit.c \
tstcunit.c \
--------------------------------depn----------------------------------------
---------------
cunit.obj: cunit.c CUnit.h
tstcunit.obj: tstcunit.c cunit.h
Best regards,
Torben
- new to make (GNU make on NT 4.0),
SMP/R&D <=