working on Makefile
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@8 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
parent
defdaeca23
commit
43b5dfd977
|
|
@ -2,64 +2,32 @@ CC = gcc
|
||||||
LD = gcc
|
LD = gcc
|
||||||
RM = rm
|
RM = rm
|
||||||
DEBUG = -DDEBUG
|
DEBUG = -DDEBUG
|
||||||
FLAGS =
|
CFLAGS = -c
|
||||||
|
LDFLAS = -o
|
||||||
|
|
||||||
|
BIN_NAME = weatherdeamon
|
||||||
|
|
||||||
#binary:
|
|
||||||
# #make clean
|
|
||||||
# # Compile
|
|
||||||
# $(CC) $(FLAGS) -o main.o -c main.c
|
|
||||||
# $(CC) $(FLAGS) -o input.o -c input.c
|
|
||||||
# $(CC) $(FLAGS) -o process.o -c process.c
|
|
||||||
# $(CC) $(FLAGS) -I/usr/include/postgresql -o write.o -c write.c
|
|
||||||
# $(CC) $(FLAGS) -o config.o -c config.c
|
|
||||||
#
|
|
||||||
# # Link
|
|
||||||
# $(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!
|
# Die postgres-pfade bekommt man mit pg_config raus!
|
||||||
|
|
||||||
|
|
||||||
# Neue Version nach Make-Buch:
|
# Neue Version nach Make-Buch:
|
||||||
|
|
||||||
weatherdaemon: main.o config.o input.o process.o write.o
|
$(BIN_NAME): 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
|
$(LD) $(DEBUG) -L/usr/lib/pgsql -lpq $(LDFLAS) $(BIN_NAME) main.o input.o process.o write.o config.o
|
||||||
|
|
||||||
main.o: main.c main.h definitions.h config.h input.h
|
main.o: main.c main.h definitions.h config.h input.h
|
||||||
$(CC) -DDEBUG -o main.o -c main.c
|
$(CC) $(DEBUG) -c main.c
|
||||||
|
|
||||||
config.o: config.c config.h definitions.h
|
config.o: config.c config.h definitions.h
|
||||||
$(CC) -DDEBUG -o config.o -c config.c
|
$(CC) $(DEBUG) -c config.c
|
||||||
|
|
||||||
input.o: input.c input.h main.h config.h definitions.h process.h
|
input.o: input.c input.h main.h config.h definitions.h process.h
|
||||||
$(CC) -DDEBUG -o input.o -c input.c
|
$(CC) $(DEBUG) -c input.c
|
||||||
|
|
||||||
process.o: process.c process.h main.h config.h definitions.h write.h
|
process.o: process.c process.h main.h config.h definitions.h write.h
|
||||||
$(CC) -DDEBUG -o process.o -c process.c
|
$(CC) $(DEBUG) -c process.c
|
||||||
|
|
||||||
write.o: write.c write.h main.h definitions.h
|
write.o: write.c write.h main.h definitions.h
|
||||||
$(CC) -DDEBUG -I/usr/include/postgresql -o write.o -c write.c
|
$(CC) $(DEBUG) -I/usr/include/postgresql -o write.o -c write.c
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
echo "Räume auf...entferne:"
|
echo "Räume auf...entferne:"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue