author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Sat, 13 Nov 2010 04:05:14 +0100 | |
changeset 153 | b223089872b6 |
parent 68 | d549894aa6a9 |
child 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 |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
2 |
CFLAGS = -Wall -O2 -Iinclude -ansi |
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) |