-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
28 lines (22 loc) · 987 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
PLUGINS=Simple Service Backdoor32764
PSOURCE=scanner.c
POBJECT=$(PSOURCE:.c=.o)
PLIB=$(PSOURCE:.c=.so)
CC=gcc
CFLAGS=-Wall -O3 -fstack-protector-all -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wcast-qual -falign-functions=4 -falign-jumps -Wint-to-pointer-cast -Wno-pointer-to-int-cast
LDFLAGS=-fPIC -ldl -lpthread
CPFLAGS=-O3 -Wall -fstack-protector-all -falign-jumps
SYFLAGS= -pedantic -Wall -std=c99 -fpic -I.
SFLAGS=-shared
PLUGSRC=src/plugin
.PHONY: all clean npingu
all: $(PLUGINS) npingu
npingu: src/npingu.c
$(CC) $(CFLAGS) src/npingu.c -o bin/npingu $(LDFLAGS)
$(PLUGINS):
$(CC) $(CPFLAGS) -c $(PLUGSRC)/$@/$(PSOURCE) -o $(PLUGSRC)/$@/$(POBJECT) $(SYFLAGS)
$(CC) -o $(PLUGSRC)/$@/$(PLIB) $(PLUGSRC)/$@/$(POBJECT) $(SFLAGS)
profile:
$(CC) -c $(PLUGSRC)/Service/$(PSOURCE) -o $(PLUGSRC)/Service/$(POBJECT) $(SYFLAGS) -g
$(CC) -o $(PLUGSRC)/Service/$(PLIB) $(PLUGSRC)/Service/$(POBJECT) $(SFLAGS)
$(CC) $(CFLAGS) -g -o bin/npingu src/npingu.c $(LDFLAGS) -pg