author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Wed, 02 May 2012 20:49:41 +0200 | |
changeset 164 | e1f4bba1097a |
parent 157 | e8fbd0653fda |
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) |