aocc22

Advent of Code 2022
git clone git://www.tkruger.se/aocc22.git
Log | Files | Refs | README

Makefile (538B)


      1 CC=clang
      2 CFLAGS=-Wall -g -I/usr/local/include
      3 LDFLAGS=-lcunit -L/usr/local/lib
      4 TEST_OBJS=\
      5   test_reading.o \
      6   test_stack_u64.o \
      7   test_stack_str.o \
      8 	test_sd.o \
      9 	test_smallset.o \
     10 	test_stack_sd.o \
     11 	test_ht.o
     12 OBJS=\
     13   ../reading.o \
     14 	../stack_u64.o \
     15   ../stack_str.o \
     16   ../sd.o \
     17 	../smallset.o \
     18 	../stack_sd.o \
     19 	../ht.o
     20 
     21 all: utils tests
     22 
     23 utils:
     24 	make -C ../
     25 
     26 tests: tests.c $(TEST_OBJS)
     27 	$(CC) $(CFLAGS) $(LDFLAGS) -o tests tests.c $(OBJS) $(TEST_OBJS)
     28 	./tests
     29 
     30 .c.o:
     31 	$(CC) $(CFLAGS) -c $<
     32 
     33 clean:
     34 	rm -rf tests $(TEST_OBJS)