diff options
| author | manuel <manuel@nc8430.lan> | 2009-10-31 16:11:26 +0100 |
|---|---|---|
| committer | manuel <manuel@nc8430.lan> | 2009-10-31 16:11:26 +0100 |
| commit | 1d8445b8461f558987067d870f0f11cdc84b4f35 (patch) | |
| tree | 146d7d02dddf1a403392ac4b86c19bca4a3c6f75 /task1/Makefile.man | |
| download | selinux-1d8445b8461f558987067d870f0f11cdc84b4f35.tar.gz selinux-1d8445b8461f558987067d870f0f11cdc84b4f35.tar.bz2 selinux-1d8445b8461f558987067d870f0f11cdc84b4f35.zip | |
pushing task1 to repo
Diffstat (limited to 'task1/Makefile.man')
| -rw-r--r-- | task1/Makefile.man | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/task1/Makefile.man b/task1/Makefile.man new file mode 100644 index 0000000..1963667 --- /dev/null +++ b/task1/Makefile.man | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | # Makefile for ehr_cli | ||
| 2 | # Author: Manuel Mausz (0728348) | ||
| 3 | |||
| 4 | # get ICE home | ||
| 5 | ICE_HOME= /usr | ||
| 6 | ifneq "$(wildcard /opt/Ice-3.3)" "" | ||
| 7 | ICE_HOME= /opt/Ice-3.3 | ||
| 8 | endif | ||
| 9 | ifneq "$(wildcard /opt/Ice-3.2)" "" | ||
| 10 | ICE_HOME= /opt/Ice-3.2 | ||
| 11 | endif | ||
| 12 | ARCH= $(shell uname -m | grep "_64" >/dev/null && echo "64") | ||
| 13 | ICE_LIB= $(ICE_HOME)/lib$(ARCH) | ||
| 14 | ICE_INC= $(ICE_HOME)/include | ||
| 15 | ICE_BIN= $(ICE_HOME)/bin | ||
| 16 | |||
| 17 | # get cairomm | ||
| 18 | CAIROMM_LIBS= `pkg-config --libs "cairomm-1.0"` | ||
| 19 | CAIROMM_CFLAGS= `pkg-config --cflags "cairomm-1.0"` | ||
| 20 | |||
| 21 | CC= g++ | ||
| 22 | LD= $(CC) | ||
| 23 | DEBUGFLAGS= -DNDEBUG | ||
| 24 | CFLAGS= -O -Wall $(DEBUGFLAGS) -I. -I$(ICE_INC) $(CAIROMM_CFLAGS) | ||
| 25 | LDFLAGS= -L$(ICE_LIB) -lIce -lIceUtil -lcrypto $(CAIROMM_LIBS) | ||
| 26 | |||
| 27 | BIN= ehr_cli | ||
| 28 | OBJS= cairodocument.o getoptwrapper.o ehr.o security.o ehrclient.o cli.o | ||
| 29 | HEADERS= getoptwrapper.h ehr.ice security.h cairodocument.h ehrclient.h utils.h | ||
| 30 | |||
| 31 | PATH:= $(ICE_BIN):${PATH} | ||
| 32 | SLICE2CPP= LD_LIBRARY_PATH=$(ICE_LIB):${LD_LIBRARY_PATH} \ | ||
| 33 | slice2cpp --header-ext h --source-ext cpp | ||
| 34 | |||
| 35 | all: $(BIN) | ||
| 36 | |||
| 37 | ehr.cpp ehr.h: ehr.ice | ||
| 38 | $(SLICE2CPP) --stream ehr.ice | ||
| 39 | |||
| 40 | $(OBJS): %.o: %.cpp $(HEADERS) | ||
| 41 | $(CC) $(CFLAGS) -c $< -o $@ | ||
| 42 | |||
| 43 | $(BIN): $(OBJS) | ||
| 44 | $(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) | ||
| 45 | |||
| 46 | debug: | ||
| 47 | @$(MAKE) -f Makefile.man all "DEBUGFLAGS=-DDEBUG -g" | ||
| 48 | |||
| 49 | clean: | ||
| 50 | rm -f $(OBJS) $(BIN) | ||
| 51 | rm -f ehr.cpp ehr.h | ||
| 52 | |||
| 53 | .PHONY: clean | ||
| 54 | |||
| 55 | # vim600: noet sw=8 ts=8 | ||
