oboeru

a collection of simple, scriptable flashcard programs
git clone anongit@rnpnr.xyz:oboeru.git
Log | Files | Refs | Feed | README | LICENSE

Makefile (628B)


      1 # See LICENSE for license details.
      2 include config.mk
      3 
      4 OBOERU_SRC = oboeru.c util.c
      5 OBOERU_OBJ = $(OBOERU_SRC:.c=.o)
      6 
      7 BINS = oboeru oboerudata oboeruhttp
      8 
      9 default: $(BINS)
     10 
     11 config.h:
     12 	cp config.def.h $@
     13 
     14 .c.o:
     15 	$(CC) $(CFLAGS) -o $@ -c $<
     16 
     17 $(OBOERU_OBJ): config.h
     18 
     19 oboeru: $(OBOERU_OBJ)
     20 	$(CC) -o $@ $(OBOERU_OBJ) $(LDFLAGS)
     21 
     22 oboerudata: oboerudata.go
     23 	go build -ldflags "$(GOLDFLAGS)" $@.go
     24 oboeruhttp: oboeruhttp.go
     25 	go build -ldflags "$(GOLDFLAGS)" $@.go
     26 
     27 install: $(BINS)
     28 	mkdir -p $(PREFIX)/bin
     29 	cp $(BINS) $(PREFIX)/bin
     30 	chmod 755 $(BINS:%=$(PREFIX)/bin/%)
     31 
     32 uninstall:
     33 	rm $(BINS:%=$(PREFIX)/bin/%)
     34 
     35 clean:
     36 	rm *.o $(BINS)