| 1 |
mocchiut |
1.1 |
SHELL = /bin/sh |
| 2 |
|
|
# decide on compiler and flags depending on host |
| 3 |
|
|
CC = g++ |
| 4 |
|
|
CFLAGS=-fPIC -pthread |
| 5 |
|
|
ALL_CFLAGS = -Wall -g $(CFLAGS) |
| 6 |
|
|
|
| 7 |
|
|
CROOT= root -l -b -q |
| 8 |
|
|
|
| 9 |
|
|
|
| 10 |
|
|
LIBS = $(PAM_LIB)/libyoda.so $(PAM_LIB)/libDarthVader.so $(PAM_LIB)/libPamLevel2.so `root-config --cflags --glibs` |
| 11 |
|
|
INCS =-I `root-config --incdir` -I$(PAM_INC) -I$(PAM_INC)/yoda/ -I./ |
| 12 |
|
|
EXE = ToFreproc.exe |
| 13 |
|
|
# pattern rule to compile object files from C files |
| 14 |
|
|
# might not work with make programs other than GNU make |
| 15 |
|
|
%.o : %.cpp Makefile |
| 16 |
|
|
$(CC) $(ALL_CFLAGS) $(INCS) -c $< -o $@ |
| 17 |
|
|
|
| 18 |
|
|
all: $(EXE) |
| 19 |
|
|
|
| 20 |
|
|
OBJS1 = ToFreproc.o |
| 21 |
|
|
ToFreproc.exe: $(OBJS1) Makefile |
| 22 |
|
|
$(CC) $(ALL_CFLAGS) $(INCS) $(OBJS1) $(LIBS) -o ToFreproc |
| 23 |
|
|
|
| 24 |
|
|
.PHONY : clean |
| 25 |
|
|
clean: |
| 26 |
|
|
rm -f *.o *.so *.exe ToFreproc |