-all: asma.o
+NAME := asma
+all: $(NAME).o
-asma.o: asma.s
- gcc -c -o asma.o asma.s
+$(NAME).o: $(NAME).s
+ @echo " COMPILE $<"
+ @gcc -c -o $(NAME).o $(NAME).s
.PHONY: clean
clean:
- rm -f asma.o asma
+ rm -f $(NAME).o $(NAME)
-test1: all
- gcc -pedantic -ansi -Wall -g -o asma asma.s main.c -D_GNU_SOURCE
+1test: all
+ @echo " COMPILE $<"
+ @gcc -pedantic -ansi -Wall -g -o $(NAME) $(NAME).s main.c -D_GNU_SOURCE
+ @echo "execute ./$(NAME)"
+ @./$(NAME)
-test2:
- /usr/ftp/pub/ublu/test/asma/test
+2test:
+ /usr/ftp/pub/ublu/test/$(NAME)/test
}
int main(int argc, char **argv) {
- char *input1[]={"asdfABCDEFGHKL54", "foofuuMUHkk"};
+ char *input1[]={"asdfABCDEFGHKL54", "foofuuMUHkk", "AbC"};
char *output1;
char *output2;
char *input2;
char *input3;
int i;
- for(i = 0; i < 2; i++) {
+ for(i = 0; i < 3; i++) {
input2 = strdup(input1[i]);
input3 = strdup(input1[i]);
output1 = (unsigned char*) asma_ref((unsigned char *)(input2));
} else {
printf("Testfall \"%s\" passt.\n", output1);
}
+ printf("\n");
free(input2);
free(input3);