Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TARGET = prog
- LIBS = -lm
- 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement