Searinox
27-11-2005, 16:10
Hallo!
Ich habe ein Makefile, das in etwa so aussieht:
1 TARGETS = src/target.c
2 CC = gcc
3 CFLAGS += -Wall -g
4 CFLAGS += -DSVN_REV=\"$(shell svnversion .)\"
5 LDDFLAGS = -lm `pkg-config --libs sndfile` `pkg-config --libs sqlite3`
6 OUTFILE = prog
7
8 all: $(TARGETS)
9 $(CC) $(CFLAGS) -o $(OUTFILE) $(TARGETS) $(LDDFLAGS)
10
11 clean:
12 rm -f $(TARGETS) $(OUTFILE) $(OUTFILE).exe
Ich möchte nun ein weiteres Target namens debug hinzufügen, das schlicht und einfach die CFLAGS um ein -DDEBUG erweitert und dann all aufruft.
Allerdings habe ich keine Ahnung, wie das gehen soll, rekursiv jedenfalls nicht.
Danke für eure Hilfe!
Ich habe ein Makefile, das in etwa so aussieht:
1 TARGETS = src/target.c
2 CC = gcc
3 CFLAGS += -Wall -g
4 CFLAGS += -DSVN_REV=\"$(shell svnversion .)\"
5 LDDFLAGS = -lm `pkg-config --libs sndfile` `pkg-config --libs sqlite3`
6 OUTFILE = prog
7
8 all: $(TARGETS)
9 $(CC) $(CFLAGS) -o $(OUTFILE) $(TARGETS) $(LDDFLAGS)
10
11 clean:
12 rm -f $(TARGETS) $(OUTFILE) $(OUTFILE).exe
Ich möchte nun ein weiteres Target namens debug hinzufügen, das schlicht und einfach die CFLAGS um ein -DDEBUG erweitert und dann all aufruft.
Allerdings habe ich keine Ahnung, wie das gehen soll, rekursiv jedenfalls nicht.
Danke für eure Hilfe!