José Moreira
José Moreira

Reputation: 135

C Makefile not working

i'm trying to do this makefile, but i'm getting ** missing separator. Stop.

  CC=gcc

    all:
        $(CC) -o sobusrv sobusrv.c 
        $(CC) -o sobucli sobucli.c 

    clean:
        mkdir ~/.Backup
        mkdir ~/.Backup/.data
        mkdir ~/.Backup/.metadata
        mkdir ~/.Backup/.tmp

What can be the problem? thank you

Upvotes: 0

Views: 71

Answers (2)

4pie0
4pie0

Reputation: 29724

Make sure you use tabs at the beginning of each command. Take a look at other, working makefile as an example, where tabs are required. Note: even if there is no visible difference to the human eye, tab and space are treated very different by program.

Upvotes: 0

abelenky
abelenky

Reputation: 64682

In most makefile environments, TABS and SPACES are treated differently, but look the same on screen. Check your indentation carefully, and make sure you don't have spaces where tabs are required.

Upvotes: 2

Related Questions