DEPS:=rabbitmq-server rabbitmq-erlang-client

C_SOURCE_DIR:=$(PACKAGE_DIR)/c_src
BINARY:=$(C_SOURCE_DIR)/kinit
C_SOURCE:=$(wildcard $(C_SOURCE_DIR)/*.c)

CC ?= gcc
CFLAGS ?=
CC_OPTS:=-g -Wall -pedantic -std=c99 -O2 -fpic $(CFLAGS)

CONSTRUCT_APP_PREREQS:=$(BINARY)
define construct_app_commands
	mkdir -p $(APP_DIR)/priv
	cp $(BINARY) $(APP_DIR)/priv
endef

define package_rules
$(BINARY): $(C_SOURCE)
	$(CC) $(CC_OPTS) -o $$@ $(C_SOURCE)

$(PACKAGE_DIR)+clean::
	rm -rf $(BINARY)

endef

DEPS:=rabbitmq-server rabbitmq-erlang-client

C_SOURCE_DIR:=$(PACKAGE_DIR)/c_src
BINARY:=$(C_SOURCE_DIR)/kinit
C_SOURCE:=$(wildcard $(C_SOURCE_DIR)/*.c)

CC ?= gcc
CFLAGS ?=
LDFLAGS ?=
CC_OPTS:=-g -Wall -pedantic -std=c99 -O2 -fpic -lkrb5 $(CFLAGS) $(LDFLAGS)

CONSTRUCT_APP_PREREQS:=$(BINARY)
define construct_app_commands
	mkdir -p $(APP_DIR)/priv
	cp $(BINARY) $(APP_DIR)/priv
endef

define package_rules
$(BINARY): $(C_SOURCE)
	$(CC) $(CC_OPTS) -o $$@ $(C_SOURCE)

$(PACKAGE_DIR)+clean::
	rm -rf $(BINARY)

endef

Add LDFLAGS and link with krb5
Add LDFLAGS and link with krb5
