Split it up this way:
PROG1 = test
PROG2 = test2
OBJ1 = test.o
OBJ2 = test2.o
all: $(PROG1) $(PROG2)
$(PROG1): $(OBJ1)
$(LD) $(LDFLAGS) $(OBJ1) -o $(PROG1)
$(PROG2): $(OBJ2)
$(LD) $(LDFLAGS) $(OBJ2) -o $(PROG2)
etc
If all that subsitution makes you nervous, you can more simply say
all: test test1
test: test.o
$(LD) $(LDFLAGS) test.o -o test
test2: test2.o
$(LD) $(LDFLAGS) test2.o -o test2
And remove this from the beginning:
PROG1 = test
PROG2 = test2
OBJ1 = test.o
OBJ2 = test2.o
There are other shortcuts, but this more specific and obvious.