Last active
July 7, 2016 03:35
-
-
Save mpeven/2e06f7d71b03ab7d78c462b8f584e1a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET = prog | |
LIBS = -lm -lcurl -ljson-c | |
CC = gcc | |
CFLAGS = -g -Wall | |
.PHONY: default all clean | |
default: $(TARGET) | |
all: default | |
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) | |
HEADERS = $(wildcard *.h) | |
%.o: %.c $(HEADERS) ; $(CC) $(CFLAGS) -c $< -o $@ | |
.PRECIOUS: $(TARGET) $(OBJECTS) | |
$(TARGET): $(OBJECTS) ; $(CC) $(OBJECTS) -Wall $(LIBS) -o $@ | |
clean: ; rm -f *.o ; rm -f $(TARGET) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment