Do not include c sources

This commit is contained in:
Florian Obser 2020-12-04 19:29:44 +01:00
parent 345215fa9b
commit 5b3dc1dd02
4 changed files with 9 additions and 8 deletions

View file

@ -3,11 +3,11 @@ PREFIX?=/usr/local/
all: vger
clean:
rm -f vger *.core
vger: main.c
${CC} -o vger main.c
rm -f vger *.core *.o
vger: main.o mimes.o
${CC} -o vger main.o mimes.o
install: vger
install -o root -g wheel vger ${PREFIX}/bin/
install -o root -g wheel vger.8 ${PREFIX}/man/man8/

4
main.c
View file

@ -8,7 +8,8 @@
#include <sys/stat.h>
#include <syslog.h>
#include <unistd.h>
#include "mimes.c"
#include "mimes.h"
#define BUFF_LEN_1 1000
#define BUFF_LEN_2 1025
@ -20,7 +21,6 @@
void display_file(const char *, const char *);
void status (const int, const char *, const char *);
void get_file_mime(const char *, char *, const ssize_t);
void drop_privileges(const char *, const char *);
int main (int, char **);

View file

@ -2,7 +2,7 @@
#include <unistd.h>
#include <string.h>
void get_file_mime(const char *, char *, const ssize_t);
#include "mimes.h"
struct mimes {
char extension[10];

1
mimes.h Normal file
View file

@ -0,0 +1 @@
void get_file_mime(const char *, char *, const ssize_t);