echo "" | gcc -E -dM -xc -
example:
echo "" | gcc -E -dM -xc - | grep SIZEOF
| #define ERROR \ | |
| do {\ | |
| fprintf(stderr, "\nERROR: \nFile: \"%s\" \nFunction: \"%s()\" \nLine: \"%i\"\n\n", \ | |
| __FILE__, __func__, __LINE__);\ | |
| raise(SIGSEGV);\ | |
| } while(0) |
| /* | |
| taken from: | |
| MOC (music on console), alsa.c | |
| */ | |
| static snd_pcm_hw_params_t *alsa_open_device (const char *device) | |
| { | |
| int rc; | |
| snd_pcm_hw_params_t *result; | |
| assert (!handle); |
| SRC_DIR := src | |
| INC_DIR := include | |
| OBJ_DIR := obj | |
| BIN_DIR := bin | |
| EXE := $(BIN_DIR)/aes | |
| SRC := $(wildcard $(SRC_DIR)/*.c) | |
| OBJ := $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| char* readFile(char* input) { | |
| FILE* input_file = fopen(input, "r"); | |
| if(!input_file) return NULL; |
echo "" | gcc -E -dM -xc -
example:
echo "" | gcc -E -dM -xc - | grep SIZEOF
| gcc -o run main.c $(pkg-config --cflags --libs gtk4 | perl -pe 's/\s+/\n/g') |