forked from mirrors/principia
Originally a C program (previously Python script) at https://github.com/principia-game/featured-list-creator for creating fl.cache files for the community site, merge into the main repository so it is with all the other util programs.
27 lines
468 B
Makefile
27 lines
468 B
Makefile
BIN = ../bin
|
|
PRINCIPIA = ../..
|
|
PROGRAM = featured-list-creator
|
|
SRCS := main.c
|
|
|
|
# always static unless you do STATIC=0
|
|
STATIC ?= 1
|
|
|
|
CC ?= gcc
|
|
CFLAGS ?= -O2 -ffunction-sections -fdata-sections
|
|
LDFLAGS ?= -Wl,--gc-sections
|
|
ifeq ($(STATIC),1)
|
|
LDFLAGS += -l:libjansson.a
|
|
else
|
|
LDFLAGS += -ljansson
|
|
endif
|
|
|
|
all: $(BIN)/$(PROGRAM)
|
|
|
|
$(BIN)/$(PROGRAM): $(SRCS)
|
|
@mkdir -p $(BIN)
|
|
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^ $(LDFLAGS)
|
|
|
|
clean:
|
|
rm $(BIN)/$(PROGRAM)
|
|
|
|
.PHONY: all clean
|