payredu

Cross-platform ledger GUI written in c99
git clone git@getsh.org:payredu.git
Log | Files | Refs | README

Makefile (1002B)


      1 GENERAL_FLAGS = # -fPIC
      2 
      3 GUI_LDFLAGS=-lglfw -lGL
      4 
      5 CFLAGS:=${GENERAL_FLAGS} -I.
      6 LDFLAGS:=${GENERAL_FLAGS}
      7 
      8 # if ${CC}
      9 ${CC}_CFLAGS := -O0 -g -Wpedantic -Werror -lm
     10 ${CC}_out := -o
     11 ${CC}_exe_out := ${${CC}_out}
     12 # else cl
     13 cl_CFLAGS := /nologo /WX /W3 /D_CRT_SECURE_NO_WARNINGS
     14 cl_exe_ext := .exe
     15 cl_out := /Fo:
     16 cl_exe_out := /Fe:
     17 
     18 # consolidate
     19 CFLAGS += ${${CC}_CFLAGS}
     20 out := ${${CC}_out}
     21 
     22 # gmake hack
     23 ^ ?= ${.ALLSRC}
     24 
     25 export LD_LIBRARY_PATH=.
     26 
     27 payredu${${CC}_exe_ext}: payredu.c libbook.a
     28 	${CC} ${${CC}_exe_out}$@ ${CFLAGS} ${LDFLAGS} $^
     29 
     30 .c.o:
     31 	${CC} ${CFLAGS} -c $^ ${out}$@
     32 
     33 bal:
     34 	#ledger -f october-2023.txt bal
     35 
     36 balance: balance.c ledger.h
     37 
     38 hot: hot.c libbalance.so
     39 
     40 libbook.a: book.o account.o
     41 	ar cr $@ $^
     42 
     43 libbook.so: book.o  account.o
     44 	${CC} -shared -Wl,-soname,$@ -o $@ $^
     45 
     46 refresh:
     47 	git ls-files | entr sh hot.sh
     48 
     49 format:
     50 	indent -psl -pal --use-tabs -ts4 -br -brs -ce -cli0 book.c
     51 
     52 include tests/tests.mk
     53 
     54 RM?=rm -f
     55 
     56 clean:
     57 	-${RM} payredu payredu.exe *.a *.so *.o *.obj hotbook $(TESTS)