initial
This commit is contained in:
24
Makefile
Normal file
24
Makefile
Normal file
@ -0,0 +1,24 @@
|
||||
CC=gcc
|
||||
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=
|
||||
|
||||
REFCNT:=$(shell git rev-list --all --count)
|
||||
VERSION:=$(shell cat VERSION)
|
||||
|
||||
.PHONY: all
|
||||
all: wsort
|
||||
|
||||
wsort: wsort.o readwords.o
|
||||
$(CC) -o $@ $(LDFLAGS) $^
|
||||
|
||||
version.o: version.c VERSION
|
||||
$(CC) -DD_REFCNT=$(REFCNT) -DD_VERSION=\"$(VERSION)\" -c $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -f *.o wsort
|
||||
|
Reference in New Issue
Block a user