Skip to content

Instantly share code, notes, and snippets.

@rmmh
Created February 7, 2013 21:41
Show Gist options
  • Save rmmh/4734506 to your computer and use it in GitHub Desktop.
Save rmmh/4734506 to your computer and use it in GitHub Desktop.
Implicit makefile rules
SRCS=iGtalk.c friends.c
BIN=iGtalk
CC=gcc
CFLAGS=-g3 -DDEBUG=1 -I include
LDLIBS=-L lib -lgnutls -lgsasl -lrecv_xml_nonblock
OBJS=$(SRCS:.c=.o)
DEP=makefile.dep
.PHONY=clean
all: $(BIN)
$(BIN): $(OBJS)
$(DEP): $(SRCS)
$(CC) $(CFLAGS) -MM $^ >$@
clean:
rm -f $(BIN) $(OBJS) $(DEP)
-include $(DEP)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment