-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (21 loc) · 617 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
export TOP := $(shell pwd)
export _DEBUG_ := y
TARGET := holymsg
LIBTARGET := lib${TARGET}.so
OBJS := ${TARGET}.o main.o
SUBDIRS := utils
CFLAGS-${_DEBUG_} += -g -ggdb
CFLAGS-y += -I${TOP}
CFLAGS-y += -D_GNU_SOURCE -D__USE_XOPEN
CFLAGS-y += -Wall -Wno-missing-braces
CFLAGS-y += -Werror
CFLAGS-${_DEBUG_} += -DDEBUG_ON=1
########## DO NOT MODIFY THE BELOW ##########
export CFLAGS := ${CFLAGS-y} -fPIC
include ${TOP}/common.mk
all: subs ${TARGET} ${LIBTARGET}
${TARGET}: ${OBJS} ${SUBOBJS}
${CC} -o $@ $^
${STRIP} $@
${LIBTARGET}: ${TARGET}.o ${SUBOBJS}
${CC} -shared -o $@ $^