Subject: what is minimal makefile?
To: None <amiga@NetBSD.ORG>
From: Karl Stenerud <>
List: amiga
Date: 01/05/1996 08:02:05
I am starting a C++ course and one of my first projects is 
creating makefiles.

I've done some work with existing makefiles before, but I've 
never actually tried to create one.

The problem is that all of the examples we were given are for 
Borland Turbo C++ for Windoze, and I would much rather run a 
real OS.

So, the example we were given is as follows (the one we have 
to create has a few extra things):

a file called "hello.c":

#include <stdio.h>
#include "hello.h"

int main(void)

a file called "hello.h":

#define HELLO_COUNT (4)

void sayHi(int count);

a file called "sub.c"

#include <stdio.h>

void sayHi(int count)
	while (count-- > 0)
		printf("Hello, World\n");

and the makefile:

# the makefile

hello.exe : hello.obj sub.obj
	tlink c0s.obj hello.obj sub.obj, hello, , cs.lib

hello.obj : hello.c hello.h
	bcc -c hello.c

sub.obj : sub.c hello.h
	bcc -c sub.c

So my question is how would I do something similar in NetBSD?