diff options
author | Daniel Jones <admin@danieljon.es> | 2019-12-08 22:53:47 +1030 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2019-12-08 22:54:16 +1030 |
commit | 3a8f8c7318d7a664684ceb5b7b2c2c9ed0b82087 (patch) | |
tree | 8ccaecfc31f6466b302522a8c08b1422d6cba96f /makefile | |
parent | d4895beb08fff1f173c58bbebe1be2e1b4c3a9ff (diff) | |
download | binstatus-3a8f8c7318d7a664684ceb5b7b2c2c9ed0b82087.tar.gz binstatus-3a8f8c7318d7a664684ceb5b7b2c2c9ed0b82087.zip |
add generic make file
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..8005ab8 --- /dev/null +++ b/makefile @@ -0,0 +1,25 @@ +TARGET = binstatus +LIBS = -lX11 +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) + |