Do not include c sources
This commit is contained in:
parent
345215fa9b
commit
5b3dc1dd02
4 changed files with 9 additions and 8 deletions
10
Makefile
10
Makefile
|
@ -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
4
main.c
|
@ -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 **);
|
||||
|
|
2
mimes.c
2
mimes.c
|
@ -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
1
mimes.h
Normal file
|
@ -0,0 +1 @@
|
|||
void get_file_mime(const char *, char *, const ssize_t);
|
Loading…
Reference in a new issue