diff options
author | daniel-Jones <daniel@danieljon.es> | 2018-10-14 13:23:58 +1030 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2018-10-14 13:23:58 +1030 |
commit | 27d1594517a3d242c5db411fc2f3216c3fc8dec1 (patch) | |
tree | 9cb2d719f741f6eca2f7ad7505f4f48f8c590ee5 /makefile | |
parent | 76df4d98d4eb88caf16bdf903978c32feba563ef (diff) | |
download | replace-27d1594517a3d242c5db411fc2f3216c3fc8dec1.tar.gz replace-27d1594517a3d242c5db411fc2f3216c3fc8dec1.zip |
first code push
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..ecb68ed --- /dev/null +++ b/makefile @@ -0,0 +1,25 @@ +TARGET = example +LIBS = +CC = gcc +CFLAGS = -g -Wall -Werror + +.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) + |