author | Markus Brökers <mbroeker@largo.homelinux.org> |
Mon, 30 Aug 2010 15:21:47 +0200 | |
changeset 146 | 0ffa20c26b2d |
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) |