Fixed all those make files
parent
743f5d215d
commit
46f0946e62
@ -0,0 +1,12 @@
|
|||||||
|
.PHONY: clean
|
||||||
|
P=erf
|
||||||
|
OBJECTS= erf.o
|
||||||
|
CFLAGS = -g -Wall -O3
|
||||||
|
LDLIBS=''
|
||||||
|
CC=gcc
|
||||||
|
|
||||||
|
$(P): $(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o $(P)
|
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
CLEANSUBDIRS ?= types structs static pointers hello headers functions file_io env_vars
|
||||||
|
|
||||||
|
cleanall:
|
||||||
|
@for subdir in $(CLEANSUBDIRS); do \
|
||||||
|
(cd $$subdir && $(MAKE) clean) || exit 1; \
|
||||||
|
done
|
@ -1,7 +1,11 @@
|
|||||||
P=
|
P=env
|
||||||
OBJECTS=
|
OBJECTS=
|
||||||
CFLAGS = -g -Wall -O3
|
CFLAGS = -g -Wall -O3
|
||||||
LDLIBS=
|
LDLIBS=
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
|
||||||
$(P): $(OBJECTS)
|
$(P): $(OBJECTS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o $(P)
|
||||||
|
rm -rf env.dSYM/
|
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
Margot,517-775-7040
|
|
|
@ -0,0 +1,12 @@
|
|||||||
|
.PHONY: clean
|
||||||
|
P=cube
|
||||||
|
OBJECTS= cube.o
|
||||||
|
CFLAGS = -g -Wall -O3
|
||||||
|
LDLIBS=''
|
||||||
|
CC=gcc
|
||||||
|
|
||||||
|
$(P): $(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o $(P)
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,33 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define DOLLARS 0x24;
|
||||||
|
|
||||||
|
// Example of function declaration. This is what the preprocessor does with the header files
|
||||||
|
void set_to_y(char *p);
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char my_char = 'a';
|
||||||
|
char *p_char;
|
||||||
|
|
||||||
|
p_char = &my_char;
|
||||||
|
|
||||||
|
printf("The value of *p_char is set to %c\n", *p_char);
|
||||||
|
set_to_y(p_char);
|
||||||
|
|
||||||
|
printf("Lets check the value of my_char: %c\n", my_char);
|
||||||
|
printf("You, know what I want to just muck with your memory directly\n");
|
||||||
|
|
||||||
|
//derefence the location and just set the byte we want
|
||||||
|
*p_char = DOLLARS;
|
||||||
|
printf("So all your bits now should show my_char as $ DOLLARS. Lets see: %c\n", my_char);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is function definition
|
||||||
|
void set_to_y(char *p)
|
||||||
|
{
|
||||||
|
fprintf(stdout, "Setting the value at address %p from %c to y\n", &p, *p);
|
||||||
|
*p = 'y';
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
|||||||
|
.PHONY: clean
|
||||||
|
P=types
|
||||||
|
OBJECTS= types.o
|
||||||
|
CFLAGS = -g -Wall -O3
|
||||||
|
LDLIBS=''
|
||||||
|
CC=gcc
|
||||||
|
|
||||||
|
$(P): $(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o $(P)
|
Loading…
Reference in New Issue