Skip to content

Instantly share code, notes, and snippets.

@shlevy
Created April 14, 2013 15:01
Show Gist options
  • Select an option

  • Save shlevy/5383038 to your computer and use it in GitHub Desktop.

Select an option

Save shlevy/5383038 to your computer and use it in GitHub Desktop.
.POSIX:
BUILDROOT = .
SOURCEROOT = .
PROGS = $(BUILDROOT)/a $(BUILDROOT)/b
.PHONY: all
all: $(BUILDROOT)/a $(BUILDROOT)/b
$(BUILDROOT)/a: $(SOURCEROOT)/a.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $(BUILDROOT)/a $(SOURCEROOT)/a.c
$(BUILDROOT)/b: $(SOURCEROOT)/b.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $(BUILDROOT)/b $(SOURCEROOT)/b.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment