summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-05-26 23:11:23 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:19 -0500
commit83599e55ba2cbd27c555548ccc84d83d6096a61c (patch)
treef357525cc223db0e46405827f2362aeb9f820dad /Makefile
parent664d5b53723342fcad8ba4ded4ae77f57df621ae (diff)
downloadperk-83599e55ba2cbd27c555548ccc84d83d6096a61c.tar.bz2
perk-83599e55ba2cbd27c555548ccc84d83d6096a61c.tar.xz
Makefile: add support for LDFLAGS_APP and LDFLAGS_LIB.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 11 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index d398dfe..065fb08 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,12 @@
-SRCTREE = .
-CFE = gcc
-CC = $(CROSS_COMPILE)$(CFE)
-CFLAGS = -O0 -g2 -I$(SRCTREE)/include -I$(SRCTREE)/src/internal -D_XOPEN_SOURCE=900
-CFLAGS_APP = -DPERK_APP
-CFLAGS_OBJ = -DPERK_PRE_ALPHA
-CFLAGS_LIB = -fPIC # -DPERK_PRE_ALPHA
+SRCTREE = .
+CFE = gcc
+CC = $(CROSS_COMPILE)$(CFE)
+CFLAGS = -O0 -g2 -I$(SRCTREE)/include -I$(SRCTREE)/src/internal -D_XOPEN_SOURCE=900
+CFLAGS_APP = -DPERK_APP
+CFLAGS_OBJ = -DPERK_PRE_ALPHA
+CFLAGS_LIB = -fPIC # -DPERK_PRE_ALPHA
+LDFLAGS_APP =
+LDFLAGS_LIB =
OBJS = pe_map_raw_image.o \
pe_get_image_meta.o \
@@ -29,7 +31,7 @@ app:
$(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_export_header.c
$(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_import_header.c
$(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/output/pe_output_export_symbols.c
- $(CC) -static -o perk perk.o $(OBJS)
+ $(CC) -static -o perk perk.o $(OBJS) $(LDFLAGS_APP)
static:
$(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/main/pe_map_raw_image.c
@@ -54,7 +56,7 @@ shared:
$(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_export_header.c
$(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_import_header.c
$(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/output/pe_output_export_symbols.c
- $(CC) -shared -o libperk.so $(OBJS)
+ $(CC) -shared -o libperk.so $(OBJS) $(LDFLAGS_LIB)
clean:
rm -f *~