I am trying to create a Makefile that compiles multiple C files for use in Minix. How would I change the Makefile so that it compiles multiple files at the same time? Below is the current state of my Makefile.
CFLAGS = -D_POSIX_SOURCE
LDFLAGS =
CC = cc
LD = cc
PROG = test
OBJS = test.o
$(PROG): $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $(PROG)
clean:
rm -rf $(PROG) $(OBJS)
I thought I could just list the other programs after PROG and OBJS such as
PROG = test test2
OBJS = test.o test2.o
but that didn't work. Any ideas? Thanks in advance.