You must do this by combining the commands in one line:
target: ./server& ./client
Make command-line command lines ( $(SHELL) ) one line at a time.
Alternatively, you can define two independent goals:
target: run_server run_client run_server: ./server run_client: ./client
and run make with the -j option to parallelize the build steps:
make -j2
This would not be the most natural solution to run your program (for example, for a test), but works best when you have a large number of build rules that can be partially built in parallel. (For a bit more control over make -s parallellization goals, see also
.NOTPARALLEL
If .NOTPARALLEL is referred to as a target, then this make call will be run in serial, even if the '-j' option is given. Any recursively invoked make command will still run recipes in parallel (unless its make file also contains this target). Any prerequisites for this purpose are ignored.
sehe
source share