csv

csv reading library
git clone git://bvnf.space/csv.git
Log | Files | Refs

Makefile (462B)


      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
.POSIX:

XCFLAGS = $(CFLAGS) -Wall -Wextra -Wpedantic -Og -ggdb3 -D_XOPEN_SOURCE=600
PREFIX = /usr/local

OBJS = libcsv.o

all: libcsv.a

$(OBJS): csv.h

.c.o:
	$(CC) -c $(XCFLAGS) -o $@ $<

libcsv.a: $(OBJS)
	$(AR) -rcs $@ $(OBJS)

install: libcsv.a csv.h
	mkdir -p \
		$(DESTDIR)$(PREFIX)/lib \
		$(DESTDIR)$(PREFIX)/include
	cp libcsv.a $(DESTDIR)$(PREFIX)/lib/
	cp csv.h    $(DESTDIR)$(PREFIX)/include/

clean:
	rm -f $(OBJS) libcsv.a

.PHONY: clean install