liblash

Basic tools written and used by lash in c programming.
Info | Log | Files | Refs

Makefile (511B)


      1 OBJS := $(patsubst %.c,%.o,$(filter-out test.c,$(wildcard *.c)))
      2 SOBJS := $(patsubst %.c,%.so.o,$(filter-out test.c,$(wildcard *.c)))
      3 INCLUDES := -I.
      4 CFLAGS += $(INCLUDES) -DRERR -DRERR_N_PFX=2
      5 VERSION = 0.0.1
      6 
      7 all: $(OBJS)
      8 
      9 test: all
     10 	$(CC) $(CFLAGS) test.c rerr.o -o test.out $(LDFLAGS)
     11 
     12 %.o: %.c
     13 	$(CC) $(CFLAGS) -c $< -o $@ $(LDFLAGS)
     14 
     15 clean:
     16 	rm -vf *.o
     17 	rm -vf *.out
     18 
     19 archive:
     20 	git archive --format=tar.gz HEAD -o rerr-$(VERSION).tar.gz
     21 
     22 %.so.o: %.c
     23 	$(CC) $(CFLAGS) -c $< -o $@ -fpic
     24 
     25 shared: $(SOBJS)
     26 
     27