how compile with turbo c (Developers)
> Hi!
>
> > i've a program ... in turbo c for dos.
> > I see many .c .prj and .hex ... nothing like .configure or other
> > files to be launch for start compilation.
> >
> > 2) how i can compile ?
>
> There is no configure, but there is make.
./configure is GNU-style for a POSIX shell (e.g. bash). While DJGPP does have a port of Bash, I believe ./configure won't really work (much, if at all) except under old 32-bit Windows' NTVDM.
Actually, you may have some success under DOSEMU2.
> So you can do:
>
> make clobber
> make all
> make clean
>
> This will first remove all leftovers from previous compiles, then compile
> everything, then remove all object files, leaving only the final exe.
Overkill, a .BAT would work just as well in 90% of cases, honestly.
The only advantage to a makefile is to (allegedly) save compilation time (and effort, not recompiling without changes) or be portable (e.g. GNUmakefile).
> You must have turboc.cfg in your current directory.
Since DOS 3.0, it should work from the .EXE directory too.
BTW, I still see bad makefiles using TLINK directly (with absolute paths!) instead of TCC. That is never necessary.
> Your actual makefile might look similar to this, taken from FORMAT:
> ...
> # very convenient but not available in Turbo C 2.01 - generic C/OBJ rule:
> # .c.obj:
> # $(CC) $(CFLAGS) -c $*.c
Are you sure? I know TC 2.01 (and TP 5.5) have a much weaker MAKE, but it should work there too. But I honestly don't remember.
At worst, you can use a different make (e.g. Wmaker or Dmake). At least Dmake (and TC++ 1.01 Make) let you swap out to save memory.
> Unfortunately, Turbo C make seems to want one rule for each obj file you
> compile, no wildcard rule support. Also, you have to use tabs, not spaces,
> for the indented lines.
Are you sure? I know TC++ 1.01 Make allows that. Dmake is also quite friendly.
Check these old makefiles I made for NASM:
* http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/asm/nasm/0.98.39/8086host/n16tcmak.zip
Complete thread:
- how compile with turbo c - iw2evk, 16.12.2025, 13:06 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- how compile with turbo c - bencollver, 16.12.2025, 15:51
- how compile with turbo c - rr, 16.12.2025, 18:24
- how compile with turbo c - bocke, 17.12.2025, 08:57
- how compile with turbo c - bocke, 17.12.2025, 09:01
- how compile with turbo c - rr, 17.12.2025, 17:43
- how compile with turbo c - bocke, 17.12.2025, 08:57
- how compile with turbo c - rr, 16.12.2025, 18:24
- how compile with turbo c - mceric, 16.12.2025, 21:37
- how compile with turbo c - Rugxulo, 17.12.2025, 03:43
- how compile with turbo c - kerravon, 18.12.2025, 19:58
- how compile with turbo c - kerravon, 18.12.2025, 20:01
- how compile with turbo c - kerravon, 19.12.2025, 04:47
- how compile with turbo c - kerravon, 19.12.2025, 09:02
- how compile with turbo c - kerravon, 18.12.2025, 19:58
- how compile with turbo c - Rugxulo, 17.12.2025, 03:43
- how compile with turbo c - Rugxulo, 17.12.2025, 03:47
- how compile with turbo c - rr, 17.12.2025, 17:46
- how compile with turbo c - Rugxulo, 17.12.2025, 21:18
- how compile with turbo c - kerravon, 18.12.2025, 15:16
- how compile with turbo c - rr, 18.12.2025, 20:57
- how compile with turbo c - Oso2k, 19.12.2025, 06:11
- how compile with turbo c - RayeR, 19.12.2025, 03:08
- how compile with turbo c - bocke, 20.12.2025, 15:18
- how compile with turbo c - Rugxulo, 17.12.2025, 21:18
- how compile with turbo c - rr, 17.12.2025, 17:46
- how compile with turbo c - bencollver, 16.12.2025, 15:51
Mix view