author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Fri, 19 Nov 2010 12:05:57 +0100 | |
changeset 157 | e8fbd0653fda |
parent 68 | d549894aa6a9 |
permissions | -rw-r--r-- |
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
1 |
CC = gcc -g -ggdb |
157
e8fbd0653fda
Simplified IPv6 aware ddos demo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
68
diff
changeset
|
2 |
CFLAGS = -Wall -O2 -Iinclude |
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
3 |
NASM = nasm -f elf -Iinclude/ |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
4 |
|
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
5 |
TARGET = client |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
6 |
TARGET += server |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
7 |
|
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
8 |
SOBJECTS = server.o |
68 | 9 |
SOBJECTS += set_proc_limit.o |
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
10 |
|
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
11 |
COBJECTS = client.o |
0 | 12 |
|
13 |
.SUFFIXES: .c .asm |
|
14 |
||
15 |
.c.o: |
|
16 |
@echo Compiling $< ... |
|
17 |
@$(CC) -c $(CFLAGS) -o $@ $< |
|
18 |
||
19 |
all: $(TARGET) |
|
20 |
||
21 |
server: $(SOBJECTS) |
|
22 |
@echo Linking $< ... |
|
23 |
@$(CC) $(CFLAGS) -o $@ $(SOBJECTS) |
|
24 |
||
25 |
client: $(COBJECTS) |
|
26 |
@echo Linking $< ... |
|
27 |
@$(CC) $(CFLAGS) -o $@ $(COBJECTS) |
|
28 |
||
29 |
.PHONY: clean uninstall |
|
30 |
||
31 |
clean: |
|
32 |
rm -f *.o *~ |
|
33 |
rm -f $(TARGET) |