summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-09-20 19:01:34 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:20 -0500
commitc145a8039d5d10ceb10714b94d376cf109308d47 (patch)
tree47211756122414d39d2ded6af7091de9975f9775
parent19bf4f31f57fc0f4e90f5c457e7542aec3c57271 (diff)
downloadperk-c145a8039d5d10ceb10714b94d376cf109308d47.tar.bz2
perk-c145a8039d5d10ceb10714b94d376cf109308d47.tar.xz
makefile replacement: step 1/2: remove the project's ad-hoc makefile.
-rw-r--r--.gitignore5
-rw-r--r--Makefile68
2 files changed, 3 insertions, 70 deletions
diff --git a/.gitignore b/.gitignore
index bc5c225..3cd07f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,5 +4,6 @@
*.so
*.gch
*.exe
-./perk
-./perk.exe
+Makefile
+/bin
+/lib
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 065fb08..0000000
--- a/Makefile
+++ /dev/null
@@ -1,68 +0,0 @@
-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 \
- pe_read_dos_header.o \
- pe_read_coff_header.o \
- pe_read_optional_header.o \
- pe_read_section_header.o \
- pe_read_export_header.o \
- pe_read_import_header.o \
- pe_output_export_symbols.o
-
-all: app static
-
-app:
- $(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/main/perk.c
- $(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/main/pe_map_raw_image.c
- $(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/main/pe_get_image_meta.c
- $(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_dos_header.c
- $(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_coff_header.c
- $(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_optional_header.c
- $(CC) $(CFLAGS_APP) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_section_header.c
- $(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) $(LDFLAGS_APP)
-
-static:
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/main/pe_map_raw_image.c
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/main/pe_get_image_meta.c
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_dos_header.c
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_coff_header.c
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_optional_header.c
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_section_header.c
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_export_header.c
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_import_header.c
- $(CC) $(CFLAGS_OBJ) $(CFLAGS) -c $(SRCTREE)/src/output/pe_output_export_symbols.c
- $(CROSS_COMPILE)ar -rc libperk.a $(OBJS)
- $(CROSS_COMPILE)ranlib libperk.a
-
-shared:
- $(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/main/pe_map_raw_image.c
- $(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/main/pe_get_image_meta.c
- $(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_dos_header.c
- $(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_coff_header.c
- $(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_optional_header.c
- $(CC) $(CFLAGS_LIB) $(CFLAGS) -c $(SRCTREE)/src/reader/pe_read_section_header.c
- $(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) $(LDFLAGS_LIB)
-
-clean:
- rm -f *~
- rm -f *.o
- rm -f *.a
- rm -f *.so
- rm -f *.gch
- rm -f perk
- rm -f perk.exe