Changing Makefile whlise reading the Make-Book
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@6 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
parent
61565644b0
commit
0535feea0c
|
|
@ -4,38 +4,59 @@ RM = rm
|
||||||
DEBUG = -DDEBUG
|
DEBUG = -DDEBUG
|
||||||
FLAGS =
|
FLAGS =
|
||||||
|
|
||||||
binary:
|
#binary:
|
||||||
#make clean
|
# #make clean
|
||||||
# Compile
|
# # Compile
|
||||||
$(CC) $(FLAGS) -o main.o -c main.c
|
# $(CC) $(FLAGS) -o main.o -c main.c
|
||||||
$(CC) $(FLAGS) -o input.o -c input.c
|
# $(CC) $(FLAGS) -o input.o -c input.c
|
||||||
$(CC) $(FLAGS) -o process.o -c process.c
|
# $(CC) $(FLAGS) -o process.o -c process.c
|
||||||
$(CC) $(FLAGS) -I/usr/include/postgresql -o write.o -c write.c
|
# $(CC) $(FLAGS) -I/usr/include/postgresql -o write.o -c write.c
|
||||||
$(CC) $(FLAGS) -o config.o -c config.c
|
# $(CC) $(FLAGS) -o config.o -c config.c
|
||||||
|
#
|
||||||
# Link
|
# # Link
|
||||||
$(LD) $(FLAGS) -L/usr/lib/pgsql -lpq -o weatherdeamon main.o input.o process.o write.o config.o
|
# $(LD) $(FLAGS) -L/usr/lib/pgsql -lpq -o weatherdeamon main.o input.o process.o write.o config.o
|
||||||
|
#
|
||||||
|
#debug:
|
||||||
|
# #make clean
|
||||||
|
# # Compile
|
||||||
|
# $(CC) -DDEBUG -o main.o -c main.c
|
||||||
|
# $(CC) -DDEBUG -o input.o -c input.c
|
||||||
|
# $(CC) -DDEBUG -o process.o -c process.c
|
||||||
|
## $(CC) -DDEBUG -I/usr/include/postgresql -o write.o -c write.c
|
||||||
|
# $(CC) -DDEBUG -o config.o -c config.c
|
||||||
|
#
|
||||||
|
# # Link
|
||||||
|
# $(LD) -DDEBUG -L/usr/lib/pgsql -lpq -o weatherdeamon main.o input.o process.o write.o config.o
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#partclean:
|
||||||
|
# #remove *.o
|
||||||
|
# $(RM) main.o input.o process.o
|
||||||
|
#
|
||||||
|
#clean:
|
||||||
|
# #remove all output
|
||||||
|
# $(RM) main.o input.o process.o write.o config.o weatherdeamon
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Die postgres-pfade bekommt man mit pg_config raus!
|
||||||
|
|
||||||
debug:
|
|
||||||
#make clean
|
# Neue Version nach Make-Buch:
|
||||||
# Compile
|
|
||||||
|
weatherdaemon: main.o config.o input.o process.o write.o
|
||||||
|
$(LD) -DDEBUG -L/usr/lib/pgsql -lpq -o weatherdeamon main.o input.o process.o write.o config.o
|
||||||
|
|
||||||
|
main.o: main.c main.h definitions.h config.h input.h
|
||||||
$(CC) -DDEBUG -o main.o -c main.c
|
$(CC) -DDEBUG -o main.o -c main.c
|
||||||
$(CC) -DDEBUG -o input.o -c input.c
|
|
||||||
$(CC) -DDEBUG -o process.o -c process.c
|
config.o: config.c config.h definitions.h
|
||||||
$(CC) -DDEBUG -I/usr/include/postgresql -o write.o -c write.c
|
|
||||||
$(CC) -DDEBUG -o config.o -c config.c
|
$(CC) -DDEBUG -o config.o -c config.c
|
||||||
|
|
||||||
# Link
|
input.o: input.c input.h main.h config.h definitions.h process.h
|
||||||
$(LD) -DDEBUG -L/usr/lib/pgsql -lpq -o weatherdeamon main.o input.o process.o write.o config.o
|
$(CC) -DDEBUG -o input.o -c input.c
|
||||||
|
|
||||||
|
|
||||||
partclean:
|
process.o: process.c process.h main.h config.h definitions.h write.h
|
||||||
#remove *.o
|
$(CC) -DDEBUG -o process.o -c process.c
|
||||||
$(RM) main.o input.o process.o
|
|
||||||
|
|
||||||
clean:
|
write.o: write.c write.h main.h definitions.h
|
||||||
#remove all output
|
$(CC) -DDEBUG -I/usr/include/postgresql -o write.o -c write.c
|
||||||
$(RM) main.o input.o process.o write.o config.o weatherdeamon
|
|
||||||
|
|
||||||
|
|
||||||
# Die postgres-pfade bekommt man mit pg_config raus!
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue